diff options
24 files changed, 980 insertions, 6 deletions
diff --git a/keyboards/annepro2/annepro2.c b/keyboards/annepro2/annepro2.c index 0f49f93104..ef18f83329 100644 --- a/keyboards/annepro2/annepro2.c +++ b/keyboards/annepro2/annepro2.c @@ -42,6 +42,8 @@ static const SerialConfig ble_uart_config = { static uint8_t led_mcu_wakeup[11] = {0x7b, 0x10, 0x43, 0x10, 0x03, 0x00, 0x00, 0x7d, 0x02, 0x01, 0x02}; +static uint8_t led_enabled = 1; + ble_capslock_t ble_capslock = {._dummy = {0}, .caps_lock = false}; #ifdef RGB_MATRIX_ENABLE @@ -226,6 +228,68 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { else ap2_led_enable(); return true; #endif + + case KC_AP_RGB_VAI: + if (record->event.pressed) { + if (get_mods() & MOD_MASK_SHIFT) { + rgb_matrix_increase_hue(); + return false; + } else if (get_mods() & MOD_MASK_CTRL) { + rgb_matrix_decrease_hue(); + return false; + } else { + rgb_matrix_increase_val(); + } + } + return true; + + case KC_AP_RGB_VAD: + if (record->event.pressed) { + if (get_mods() & MOD_MASK_SHIFT) { + rgb_matrix_increase_sat(); + return false; + } else if (get_mods() & MOD_MASK_CTRL) { + rgb_matrix_decrease_sat(); + return false; + } else { + rgb_matrix_decrease_val(); + } + } + return true; + + case KC_AP_RGB_TOG: + if (record->event.pressed) { + if (get_mods() & MOD_MASK_SHIFT) { + rgb_matrix_increase_speed(); + return false; + } else if (get_mods() & MOD_MASK_CTRL) { + rgb_matrix_decrease_speed(); + return false; + } else { + if (led_enabled) { + ap2_led_disable(); + rgb_matrix_disable(); + led_enabled = 0; + } else { + ap2_led_enable(); + rgb_matrix_enable(); + led_enabled = 1; + } + return true; + } + } + return true; + + case KC_AP_RGB_MOD: + if (record->event.pressed) { + if (get_mods() & MOD_MASK_CTRL) { + rgb_matrix_step_reverse(); + return false; + } else { + rgb_matrix_step(); + } + } + return true; default: break; diff --git a/keyboards/annepro2/annepro2.h b/keyboards/annepro2/annepro2.h index 143904b6ad..393d9b4731 100644 --- a/keyboards/annepro2/annepro2.h +++ b/keyboards/annepro2/annepro2.h @@ -58,6 +58,10 @@ enum AP2KeyCodes { KC_AP_LED_PREV_PROFILE, KC_AP_LED_NEXT_INTENSITY, KC_AP_LED_SPEED, + KC_AP_RGB_VAI, + KC_AP_RGB_VAD, + KC_AP_RGB_TOG, + KC_AP_RGB_MOD, AP2_SAFE_RANGE, }; diff --git a/keyboards/annepro2/keymaps/default/keymap.c b/keyboards/annepro2/keymaps/default/keymap.c index 8f5b639bb8..8af2d9a32c 100644 --- a/keyboards/annepro2/keymaps/default/keymap.c +++ b/keyboards/annepro2/keymaps/default/keymap.c @@ -83,7 +83,7 @@ enum anne_pro_layers { /* * Layer FN2 * ,-----------------------------------------------------------------------------------------. - * | ~ | BT1 | BT2 | BT3 | BT4 | F5 | F6 | HUE | SAT | BRI | SPD | MOD | TOG | Bksp | + * | ~ | BT1 | BT2 | BT3 | BT4 | F5 | F6 | F7 | F8 | MOD | TOG | BRI- | BRI+ | Bksp | * |-----------------------------------------------------------------------------------------+ * | Tab | q | UP | e | r | t | y | u | i | o | PS | HOME | END | \ | * |-----------------------------------------------------------------------------------------+ @@ -96,11 +96,11 @@ enum anne_pro_layers { * */ [FN2] = LAYOUT_60_ansi( /* FN2 */ - _______, KC_AP2_BT1, KC_AP2_BT2, KC_AP2_BT3, KC_AP2_BT4, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_MOD, RGB_TOG, _______, - MO(FN2), _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_HOME, KC_END, _______, - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, _______, - _______, _______, _______, _______, _______, MO(FN1), MO(FN2), _______ + _______, KC_AP2_BT1, KC_AP2_BT2, KC_AP2_BT3, KC_AP2_BT4, _______, _______, _______, _______, KC_AP_RGB_MOD, KC_AP_RGB_TOG, KC_AP_RGB_VAD, KC_AP_RGB_VAI, _______, + MO(FN2), _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_HOME, KC_END, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, _______, + _______, _______, _______, _______, _______, MO(FN1), MO(FN2), _______ ), }; // clang-format on diff --git a/keyboards/frooastboard/walnut/config.h b/keyboards/frooastboard/walnut/config.h new file mode 100644 index 0000000000..081a084d16 --- /dev/null +++ b/keyboards/frooastboard/walnut/config.h @@ -0,0 +1,55 @@ +// Copyright 2022 Simon Benezan (@Frooastside) +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +#define ISSI_TIMEOUT 100 +#define ISSI_PERSISTENCE 0 +#define ISSI_PWM_FREQUENCY 0b010 +#define ISSI_SWPULLUP PUR_0R +#define ISSI_CSPULLUP PUR_0R +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 48 +#define DRIVER_ADDR_1 0b1010000 + +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 191 + +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW + +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 +#define RGB_MATRIX_STARTUP_HUE 0 +#define RGB_MATRIX_STARTUP_SAT 255 +#define RGB_MATRIX_STARTUP_SPD 191 +#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_RAINBOW_MOVING_CHEVRON diff --git a/keyboards/frooastboard/walnut/info.json b/keyboards/frooastboard/walnut/info.json new file mode 100644 index 0000000000..7a8276f3ff --- /dev/null +++ b/keyboards/frooastboard/walnut/info.json @@ -0,0 +1,259 @@ +{ + "keyboard_name": "Frooastboard Walnut", + "manufacturer": "Frooastside", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/frooastboard/walnut", + "maintainer": "Frooastside", + "debounce": 5, + "diode_direction": "COL2ROW", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": false, + "mousekey": false, + "nkro": true + }, + "build": { + "lto": true + }, + "matrix_pins": { + "cols": ["B0", "B1", "B2", "B3", "B5", "B6", "C6", "C7"], + "rows": ["B4", "D7", "D6", "D4", "D5", "D3", "D2", "F1", "F0"] + }, + "usb": { + "vid": "0x4642", + "pid": "0x776E", + "device_version": "1.0.0" + }, + "layouts": { + "LAYOUT_ansi": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, + { "matrix": [0, 5], "x": 5, "y": 0 }, + { "matrix": [0, 6], "x": 6, "y": 0 }, + { "matrix": [0, 7], "x": 7, "y": 0 }, + { "matrix": [1, 0], "x": 8, "y": 0 }, + { "matrix": [1, 1], "x": 9, "y": 0 }, + { "matrix": [1, 2], "x": 10, "y": 0 }, + { "matrix": [1, 3], "x": 11, "y": 0 }, + { "matrix": [1, 4], "x": 12, "y": 0 }, + { "matrix": [1, 5], "x": 13, "y": 0, "w": 2 }, + { "matrix": [5, 5], "x": 15.5, "y": 0 }, + { "matrix": [5, 6], "x": 16.5, "y": 0 }, + { "matrix": [5, 7], "x": 17.5, "y": 0 }, + { "matrix": [2, 0], "x": 0, "y": 1, "w": 1.5 }, + { "matrix": [2, 1], "x": 1.5, "y": 1 }, + { "matrix": [2, 2], "x": 2.5, "y": 1 }, + { "matrix": [2, 3], "x": 3.5, "y": 1 }, + { "matrix": [2, 4], "x": 4.5, "y": 1 }, + { "matrix": [2, 5], "x": 5.5, "y": 1 }, + { "matrix": [2, 6], "x": 6.5, "y": 1 }, + { "matrix": [2, 7], "x": 7.5, "y": 1 }, + { "matrix": [3, 0], "x": 8.5, "y": 1 }, + { "matrix": [3, 1], "x": 9.5, "y": 1 }, + { "matrix": [3, 2], "x": 10.5, "y": 1 }, + { "matrix": [3, 3], "x": 11.5, "y": 1 }, + { "matrix": [3, 4], "x": 12.5, "y": 1 }, + { "matrix": [5, 4], "x": 13.5, "y": 1, "w": 1.5 }, + { "matrix": [7, 5], "x": 15.5, "y": 1 }, + { "matrix": [7, 6], "x": 16.5, "y": 1 }, + { "matrix": [7, 7], "x": 17.5, "y": 1 }, + { "matrix": [4, 0], "x": 0, "y": 2, "w": 1.75 }, + { "matrix": [4, 1], "x": 1.75, "y": 2 }, + { "matrix": [4, 2], "x": 2.75, "y": 2 }, + { "matrix": [4, 3], "x": 3.75, "y": 2 }, + { "matrix": [4, 4], "x": 4.75, "y": 2 }, + { "matrix": [4, 5], "x": 5.75, "y": 2 }, + { "matrix": [4, 6], "x": 6.75, "y": 2 }, + { "matrix": [4, 7], "x": 7.75, "y": 2 }, + { "matrix": [5, 0], "x": 8.75, "y": 2 }, + { "matrix": [5, 1], "x": 9.75, "y": 2 }, + { "matrix": [5, 2], "x": 10.75, "y": 2 }, + { "matrix": [5, 3], "x": 11.75, "y": 2 }, + { "matrix": [3, 5], "x": 12.75, "y": 2, "w": 2.25 }, + { "matrix": [6, 0], "x": 0, "y": 3, "w": 2.25 }, + { "matrix": [6, 2], "x": 2.25, "y": 3 }, + { "matrix": [6, 3], "x": 3.25, "y": 3 }, + { "matrix": [6, 4], "x": 4.25, "y": 3 }, + { "matrix": [6, 5], "x": 5.25, "y": 3 }, + { "matrix": [6, 6], "x": 6.25, "y": 3 }, + { "matrix": [6, 7], "x": 7.25, "y": 3 }, + { "matrix": [7, 0], "x": 8.25, "y": 3 }, + { "matrix": [7, 1], "x": 9.25, "y": 3 }, + { "matrix": [7, 2], "x": 10.25, "y": 3 }, + { "matrix": [7, 3], "x": 11.25, "y": 3 }, + { "matrix": [7, 4], "x": 12.25, "y": 3, "w": 2.75 }, + { "matrix": [3, 6], "x": 16.5, "y": 3 }, + { "matrix": [8, 0], "x": 0, "y": 4, "w": 1.25 }, + { "matrix": [8, 1], "x": 1.25, "y": 4, "w": 1.25 }, + { "matrix": [8, 2], "x": 2.5, "y": 4, "w": 1.25 }, + { "matrix": [8, 3], "x": 3.75, "y": 4, "w": 6.25 }, + { "matrix": [8, 4], "x": 10, "y": 4, "w": 1.25 }, + { "matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25 }, + { "matrix": [8, 6], "x": 12.5, "y": 4, "w": 1.25 }, + { "matrix": [8, 7], "x": 13.75, "y": 4, "w": 1.25 }, + { "matrix": [1, 6], "x": 15.5, "y": 4 }, + { "matrix": [3, 7], "x": 16.5, "y": 4 }, + { "matrix": [1, 7], "x": 17.5, "y": 4 } + ] + }, + "LAYOUT_iso": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, + { "matrix": [0, 5], "x": 5, "y": 0 }, + { "matrix": [0, 6], "x": 6, "y": 0 }, + { "matrix": [0, 7], "x": 7, "y": 0 }, + { "matrix": [1, 0], "x": 8, "y": 0 }, + { "matrix": [1, 1], "x": 9, "y": 0 }, + { "matrix": [1, 2], "x": 10, "y": 0 }, + { "matrix": [1, 3], "x": 11, "y": 0 }, + { "matrix": [1, 4], "x": 12, "y": 0 }, + { "matrix": [1, 5], "x": 13, "y": 0, "w": 2 }, + { "matrix": [5, 5], "x": 15.5, "y": 0 }, + { "matrix": [5, 6], "x": 16.5, "y": 0 }, + { "matrix": [5, 7], "x": 17.5, "y": 0 }, + { "matrix": [2, 0], "x": 0, "y": 1, "w": 1.5 }, + { "matrix": [2, 1], "x": 1.5, "y": 1 }, + { "matrix": [2, 2], "x": 2.5, "y": 1 }, + { "matrix": [2, 3], "x": 3.5, "y": 1 }, + { "matrix": [2, 4], "x": 4.5, "y": 1 }, + { "matrix": [2, 5], "x": 5.5, "y": 1 }, + { "matrix": [2, 6], "x": 6.5, "y": 1 }, + { "matrix": [2, 7], "x": 7.5, "y": 1 }, + { "matrix": [3, 0], "x": 8.5, "y": 1 }, + { "matrix": [3, 1], "x": 9.5, "y": 1 }, + { "matrix": [3, 2], "x": 10.5, "y": 1 }, + { "matrix": [3, 3], "x": 11.5, "y": 1 }, + { "matrix": [3, 4], "x": 12.5, "y": 1 }, + { "matrix": [3, 5], "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, + { "matrix": [7, 5], "x": 15.5, "y": 1 }, + { "matrix": [7, 6], "x": 16.5, "y": 1 }, + { "matrix": [7, 7], "x": 17.5, "y": 1 }, + { "matrix": [4, 0], "x": 0, "y": 2, "w": 1.75 }, + { "matrix": [4, 1], "x": 1.75, "y": 2 }, + { "matrix": [4, 2], "x": 2.75, "y": 2 }, + { "matrix": [4, 3], "x": 3.75, "y": 2 }, + { "matrix": [4, 4], "x": 4.75, "y": 2 }, + { "matrix": [4, 5], "x": 5.75, "y": 2 }, + { "matrix": [4, 6], "x": 6.75, "y": 2 }, + { "matrix": [4, 7], "x": 7.75, "y": 2 }, + { "matrix": [5, 0], "x": 8.75, "y": 2 }, + { "matrix": [5, 1], "x": 9.75, "y": 2 }, + { "matrix": [5, 2], "x": 10.75, "y": 2 }, + { "matrix": [5, 3], "x": 11.75, "y": 2 }, + { "matrix": [5, 4], "x": 12.75, "y": 2 }, + { "matrix": [6, 0], "x": 0, "y": 3, "w": 1.25 }, + { "matrix": [6, 1], "x": 1.25, "y": 3 }, + { "matrix": [6, 2], "x": 2.25, "y": 3 }, + { "matrix": [6, 3], "x": 3.25, "y": 3 }, + { "matrix": [6, 4], "x": 4.25, "y": 3 }, + { "matrix": [6, 5], "x": 5.25, "y": 3 }, + { "matrix": [6, 6], "x": 6.25, "y": 3 }, + { "matrix": [6, 7], "x": 7.25, "y": 3 }, + { "matrix": [7, 0], "x": 8.25, "y": 3 }, + { "matrix": [7, 1], "x": 9.25, "y": 3 }, + { "matrix": [7, 2], "x": 10.25, "y": 3 }, + { "matrix": [7, 3], "x": 11.25, "y": 3 }, + { "matrix": [7, 4], "x": 12.25, "y": 3, "w": 2.75 }, + { "matrix": [3, 6], "x": 16.5, "y": 3 }, + { "matrix": [8, 0], "x": 0, "y": 4, "w": 1.25 }, + { "matrix": [8, 1], "x": 1.25, "y": 4, "w": 1.25 }, + { "matrix": [8, 2], "x": 2.5, "y": 4, "w": 1.25 }, + { "matrix": [8, 3], "x": 3.75, "y": 4, "w": 6.25 }, + { "matrix": [8, 4], "x": 10, "y": 4, "w": 1.25 }, + { "matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25 }, + { "matrix": [8, 6], "x": 12.5, "y": 4, "w": 1.25 }, + { "matrix": [8, 7], "x": 13.75, "y": 4, "w": 1.25 }, + { "matrix": [1, 6], "x": 15.5, "y": 4 }, + { "matrix": [3, 7], "x": 16.5, "y": 4 }, + { "matrix": [1, 7], "x": 17.5, "y": 4 } + ] + }, + "LAYOUT_all": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, + { "matrix": [0, 5], "x": 5, "y": 0 }, + { "matrix": [0, 6], "x": 6, "y": 0 }, + { "matrix": [0, 7], "x": 7, "y": 0 }, + { "matrix": [1, 0], "x": 8, "y": 0 }, + { "matrix": [1, 1], "x": 9, "y": 0 }, + { "matrix": [1, 2], "x": 10, "y": 0 }, + { "matrix": [1, 3], "x": 11, "y": 0 }, + { "matrix": [1, 4], "x": 12, "y": 0 }, + { "matrix": [1, 5], "x": 13, "y": 0, "w": 2 }, + { "matrix": [5, 5], "x": 15.5, "y": 0 }, + { "matrix": [5, 6], "x": 16.5, "y": 0 }, + { "matrix": [5, 7], "x": 17.5, "y": 0 }, + { "matrix": [2, 0], "x": 0, "y": 1, "w": 1.5 }, + { "matrix": [2, 1], "x": 1.5, "y": 1 }, + { "matrix": [2, 2], "x": 2.5, "y": 1 }, + { "matrix": [2, 3], "x": 3.5, "y": 1 }, + { "matrix": [2, 4], "x": 4.5, "y": 1 }, + { "matrix": [2, 5], "x": 5.5, "y": 1 }, + { "matrix": [2, 6], "x": 6.5, "y": 1 }, + { "matrix": [2, 7], "x": 7.5, "y": 1 }, + { "matrix": [3, 0], "x": 8.5, "y": 1 }, + { "matrix": [3, 1], "x": 9.5, "y": 1 }, + { "matrix": [3, 2], "x": 10.5, "y": 1 }, + { "matrix": [3, 3], "x": 11.5, "y": 1 }, + { "matrix": [3, 4], "x": 12.5, "y": 1 }, + { "matrix": [5, 4], "x": 13.5, "y": 1, "w": 1.5 }, + { "matrix": [7, 5], "x": 15.5, "y": 1 }, + { "matrix": [7, 6], "x": 16.5, "y": 1 }, + { "matrix": [7, 7], "x": 17.5, "y": 1 }, + { "matrix": [4, 0], "x": 0, "y": 2, "w": 1.75 }, + { "matrix": [4, 1], "x": 1.75, "y": 2 }, + { "matrix": [4, 2], "x": 2.75, "y": 2 }, + { "matrix": [4, 3], "x": 3.75, "y": 2 }, + { "matrix": [4, 4], "x": 4.75, "y": 2 }, + { "matrix": [4, 5], "x": 5.75, "y": 2 }, + { "matrix": [4, 6], "x": 6.75, "y": 2 }, + { "matrix": [4, 7], "x": 7.75, "y": 2 }, + { "matrix": [5, 0], "x": 8.75, "y": 2 }, + { "matrix": [5, 1], "x": 9.75, "y": 2 }, + { "matrix": [5, 2], "x": 10.75, "y": 2 }, + { "matrix": [5, 3], "x": 11.75, "y": 2 }, + { "matrix": [3, 5], "x": 12.75, "y": 2, "w": 2.25 }, + { "matrix": [6, 0], "x": 0, "y": 3, "w": 1.25 }, + { "matrix": [6, 1], "x": 1.25, "y": 3 }, + { "matrix": [6, 2], "x": 2.25, "y": 3 }, + { "matrix": [6, 3], "x": 3.25, "y": 3 }, + { "matrix": [6, 4], "x": 4.25, "y": 3 }, + { "matrix": [6, 5], "x": 5.25, "y": 3 }, + { "matrix": [6, 6], "x": 6.25, "y": 3 }, + { "matrix": [6, 7], "x": 7.25, "y": 3 }, + { "matrix": [7, 0], "x": 8.25, "y": 3 }, + { "matrix": [7, 1], "x": 9.25, "y": 3 }, + { "matrix": [7, 2], "x": 10.25, "y": 3 }, + { "matrix": [7, 3], "x": 11.25, "y": 3 }, + { "matrix": [7, 4], "x": 12.25, "y": 3, "w": 2.75 }, + { "matrix": [3, 6], "x": 16.5, "y": 3 }, + { "matrix": [8, 0], "x": 0, "y": 4, "w": 1.25 }, + { "matrix": [8, 1], "x": 1.25, "y": 4, "w": 1.25 }, + { "matrix": [8, 2], "x": 2.5, "y": 4, "w": 1.25 }, + { "matrix": [8, 3], "x": 3.75, "y": 4, "w": 6.25 }, + { "matrix": [8, 4], "x": 10, "y": 4, "w": 1.25 }, + { "matrix": [8, 5], "x": 11.25, "y": 4, "w": 1.25 }, + { "matrix": [8, 6], "x": 12.5, "y": 4, "w": 1.25 }, + { "matrix": [8, 7], "x": 13.75, "y": 4, "w": 1.25 }, + { "matrix": [1, 6], "x": 15.5, "y": 4 }, + { "matrix": [3, 7], "x": 16.5, "y": 4 }, + { "matrix": [1, 7], "x": 17.5, "y": 4 } + ] + } + } +} diff --git a/keyboards/frooastboard/walnut/keymaps/default/keymap.c b/keyboards/frooastboard/walnut/keymaps/default/keymap.c new file mode 100644 index 0000000000..195b3c150b --- /dev/null +++ b/keyboards/frooastboard/walnut/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +// Copyright 2022 Simon Benezan (@Frooastside) +// SPDX-License-Identifier: GPL-3.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, EE_CLR, KC_PSCR, KC_SCRL, KC_PAUS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAI, RGB_HUI, RGB_SPI, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, + KC_TRNS, GUI_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD,RGB_VAD, RGB_MOD) +}; diff --git a/keyboards/frooastboard/walnut/keymaps/default_ansi/keymap.c b/keyboards/frooastboard/walnut/keymaps/default_ansi/keymap.c new file mode 100644 index 0000000000..a65dfe3a6e --- /dev/null +++ b/keyboards/frooastboard/walnut/keymaps/default_ansi/keymap.c @@ -0,0 +1,20 @@ +// Copyright 2022 Simon Benezan (@Frooastside) +// SPDX-License-Identifier: GPL-3.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, EE_CLR, KC_PSCR, KC_SCRL, KC_PAUS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAI, RGB_HUI, RGB_SPI, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, + KC_TRNS, GUI_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD,RGB_VAD, RGB_MOD) +}; diff --git a/keyboards/frooastboard/walnut/keymaps/default_iso/keymap.c b/keyboards/frooastboard/walnut/keymaps/default_iso/keymap.c new file mode 100644 index 0000000000..8dd069ba3e --- /dev/null +++ b/keyboards/frooastboard/walnut/keymaps/default_iso/keymap.c @@ -0,0 +1,20 @@ +// Copyright 2022 Simon Benezan (@Frooastside) +// SPDX-License-Identifier: GPL-3.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_iso( + 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_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_iso( + 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, EE_CLR, KC_PSCR, KC_SCRL, KC_PAUS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_SAI, RGB_HUI, RGB_SPI, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, + KC_TRNS, GUI_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD,RGB_VAD, RGB_MOD) +}; diff --git a/keyboards/frooastboard/walnut/keymaps/via/config.h b/keyboards/frooastboard/walnut/keymaps/via/config.h new file mode 100644 index 0000000000..0ef255fb51 --- /dev/null +++ b/keyboards/frooastboard/walnut/keymaps/via/config.h @@ -0,0 +1,7 @@ +// Copyright 2022 Simon Benezan (@Frooastside) +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#define VIA_CUSTOM_LIGHTING_ENABLE +#define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/frooastboard/walnut/keymaps/via/keymap.c b/keyboards/frooastboard/walnut/keymaps/via/keymap.c new file mode 100644 index 0000000000..84b73e2186 --- /dev/null +++ b/keyboards/frooastboard/walnut/keymaps/via/keymap.c @@ -0,0 +1,131 @@ +// Copyright 2022 Simon Benezan (@Frooastside) +// SPDX-License-Identifier: GPL-3.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, EE_CLR, KC_PSCR, KC_SCRL, KC_PAUS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, + KC_TRNS, GUI_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD,RGB_VAD, RGB_MOD) +}; + +#if defined(RGB_MATRIX_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE) + +// VIA supports only 4 discrete values for effect speed; map these to some +// useful speed values for RGB Matrix. +enum speed_values { + RGBLIGHT_SPEED_0 = UINT8_MAX / 16, // not 0 to avoid really slow effects + RGBLIGHT_SPEED_1 = UINT8_MAX / 4, + RGBLIGHT_SPEED_2 = UINT8_MAX / 2, // matches the default value + RGBLIGHT_SPEED_3 = UINT8_MAX / 4 * 3, // UINT8_MAX is really fast +}; + +static uint8_t speed_from_rgblight(uint8_t rgblight_speed) { + switch (rgblight_speed) { + case 0: + return RGBLIGHT_SPEED_0; + case 1: + return RGBLIGHT_SPEED_1; + case 2: + default: + return RGBLIGHT_SPEED_2; + case 3: + return RGBLIGHT_SPEED_3; + } +} + +static uint8_t speed_to_rgblight(uint8_t rgb_matrix_speed) { + if (rgb_matrix_speed < ((RGBLIGHT_SPEED_0 + RGBLIGHT_SPEED_1) / 2)) { + return 0; + } else if (rgb_matrix_speed < ((RGBLIGHT_SPEED_1 + RGBLIGHT_SPEED_2) / 2)) { + return 1; + } else if (rgb_matrix_speed < ((RGBLIGHT_SPEED_2 + RGBLIGHT_SPEED_3) / 2)) { + return 2; + } else { + return 3; + } +} + +void via_qmk_rgblight_get_value(uint8_t *data) { + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch (*value_id) { + case id_qmk_rgblight_brightness: { + value_data[0] = rgb_matrix_get_val(); + break; + } + case id_qmk_rgblight_effect: { + value_data[0] = rgb_matrix_is_enabled() ? rgb_matrix_get_mode() : 0; + break; + } + case id_qmk_rgblight_effect_speed: { + value_data[0] = speed_to_rgblight(rgb_matrix_get_speed()); + break; + } + case id_qmk_rgblight_color: { + value_data[0] = rgb_matrix_get_hue(); + value_data[1] = rgb_matrix_get_sat(); + break; + } + } +} + +void via_qmk_rgblight_set_value(uint8_t *data) { + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch (*value_id) { + case id_qmk_rgblight_brightness: { + rgb_matrix_sethsv_noeeprom(rgblight_get_hue(), rgblight_get_sat(), value_data[0]); + break; + } + case id_qmk_rgblight_effect: { + if (value_data[0] == 0) { + rgb_matrix_disable_noeeprom(); + } else { + rgb_matrix_enable_noeeprom(); + rgb_matrix_mode_noeeprom(value_data[0]); + } + break; + } + case id_qmk_rgblight_effect_speed: { + rgb_matrix_set_speed_noeeprom(speed_from_rgblight(value_data[0])); + break; + } + case id_qmk_rgblight_color: { + rgb_matrix_sethsv_noeeprom(value_data[0], value_data[1], rgblight_get_val()); + break; + } + } +} + +void raw_hid_receive_kb(uint8_t *data, uint8_t length) { + uint8_t *command_id = &(data[0]); + uint8_t *command_data = &(data[1]); + switch (*command_id) { + case id_lighting_set_value: + via_qmk_rgblight_set_value(command_data); + break; + case id_lighting_get_value: + via_qmk_rgblight_get_value(command_data); + break; + case id_lighting_save: + eeconfig_update_rgb_matrix(); + break; + default: + // Unhandled message. + *command_id = id_unhandled; + break; + } +} + +#endif // defined(RGB_MATRIX_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE) diff --git a/keyboards/frooastboard/walnut/keymaps/via/rules.mk b/keyboards/frooastboard/walnut/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/frooastboard/walnut/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/frooastboard/walnut/readme.md b/keyboards/frooastboard/walnut/readme.md new file mode 100644 index 0000000000..c4baa40ce4 --- /dev/null +++ b/keyboards/frooastboard/walnut/readme.md @@ -0,0 +1,27 @@ +# Frooastboard Walnut + +![frooastboard/walnut](https://i.imgur.com/4erTDZqh.jpg) + +This is the Frooastboard Walnut keyboard. It is made of walnut wood, has 48 underglow LEDs and a solid alu |