diff options
13 files changed, 540 insertions, 0 deletions
diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/config.h b/keyboards/sawnsprojects/krush/krush65/hotswap/config.h new file mode 100644 index 0000000000..ebf8cbf740 --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/config.h @@ -0,0 +1,72 @@ +/* Copyright 2021 SawnsProjects + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5350 +#define PRODUCT_ID 0x5B31 +#define DEVICE_VER 0x0001 +#define MANUFACTURER SawnsProjects +#define PRODUCT Krush65 - Hotswap + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B1, B2, D4, F1, F0 } +#define MATRIX_COL_PINS { B7, B3, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D0, D5, D6, D3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW +/* Caps Lock */ +#define LED_CAPS_LOCK_PIN B0 +#define LED_PIN_ON_STATE 0 + +/* Encoders */ + +#define ENCODERS 1 + +#define ENCODERS_PAD_A { D1 } +#define ENCODERS_PAD_B { D2 } + +#define ENCODERS_CW_KEY { { 12, 3 } } +#define ENCODERS_CCW_KEY { { 12, 4 } } + +/* RGB */ +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 20 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#endif
\ No newline at end of file diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c b/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c new file mode 100644 index 0000000000..039f8739b4 --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.c @@ -0,0 +1,58 @@ +/* Copyright 2020 Neil Brian Ramirez + * Copyright 2021 drashna jael're (@drashna) + * Copyright 2021 uybv + * Copyright 2021 SawnsProjects + * + * 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "encoder_actions.h" + +#ifdef ENCODER_ENABLE + +# ifdef ENCODERS +static uint8_t encoder_state[ENCODERS] = {0}; +static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +# endif + +void encoder_action_unregister(void) { +# ifdef ENCODERS + for (int index = 0; index < ENCODERS; ++index) { + if (encoder_state[index]) { + keyevent_t encoder_event = (keyevent_t) { + .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], + .pressed = false, + .time = (timer_read() | 1) + }; + encoder_state[index] = 0; + action_exec(encoder_event); + } + } +# endif +} + +void encoder_action_register(uint8_t index, bool clockwise) { +# ifdef ENCODERS + keyevent_t encoder_event = (keyevent_t) { + .key = clockwise ? encoder_cw[index] : encoder_ccw[index], + .pressed = true, + .time = (timer_read() | 1) + }; + encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); + action_exec(encoder_event); +# endif +} + +#endif
\ No newline at end of file diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.h b/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.h new file mode 100644 index 0000000000..098210d40c --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/encoder_actions.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "quantum.h" + +void encoder_action_unregister(void); + +void encoder_action_register(uint8_t index, bool clockwise);
\ No newline at end of file diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/hotswap.c b/keyboards/sawnsprojects/krush/krush65/hotswap/hotswap.c new file mode 100644 index 0000000000..8fd9a2fa14 --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/hotswap.c @@ -0,0 +1,31 @@ +/* Copyright 2021 SawnsProjects + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "hotswap.h" + +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + } + return true; +} +#endif
\ No newline at end of file diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/hotswap.h b/keyboards/sawnsprojects/krush/krush65/hotswap/hotswap.h new file mode 100644 index 0000000000..cc0d0dc7e9 --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/hotswap.h @@ -0,0 +1,53 @@ +/* Copyright 2021 SawnsProjects + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" +#include "encoder_actions.h" + + + +#define XXX KC_NO + + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K42, K43, K45, K46, K47, K48, K4B, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, XXX, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, XXX, K2F }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, XXX, K42, K43, XXX, K45, K46, K47, K48, XXX, XXX, K4B, XXX, K4D, K4E, K4F }, \ +} + +#define LAYOUT_via_rotary( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, EC1A, EC2A,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K42, K43, K45, K46, K47, K48, K4B, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, XXX, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, XXX, K2F }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, EC1A, K3D, K3E, K3F }, \ + { K40, XXX, K42, K43, XXX, K45, K46, K47, K48, XXX, XXX, K4B, EC2A, K4D, K4E, K4F }, \ +} diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/info.json b/keyboards/sawnsprojects/krush/krush65/hotswap/info.json new file mode 100644 index 0000000000..2e54420137 --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/info.json @@ -0,0 +1,157 @@ +{ + "keyboard_name": "Krush65 Hotswap", + "url": "", + "maintainer": "MaiTheSan", + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "", "x": 0, "y": 0 }, + { "label": "", "x": 1, "y": 0 }, + { "label": "", "x": 2, "y": 0 }, + { "label": "", "x": 3, "y": 0 }, + { "label": "", "x": 4, "y": 0 }, + { "label": "", "x": 5, "y": 0 }, + { "label": "", "x": 6, "y": 0 }, + { "label": "", "x": 7, "y": 0 }, + { "label": "", "x": 8, "y": 0 }, + { "label": "", "x": 9, "y": 0 }, + { "label": "", "x": 10, "y": 0 }, + { "label": "", "x": 11, "y": 0 }, + { "label": "", "x": 12, "y": 0 }, + { "label": "", "x": 13, "y": 0 }, + { "label": "", "x": 14, "y": 0 }, + { "label": "", "x": 15, "y": 0 }, + { "label": "", "x": 0, "y": 1, "w": 1.5 }, + { "label": "", "x": 1.5, "y": 1 }, + { "label": "", "x": 2.5, "y": 1 }, + { "label": "", "x": 3.5, "y": 1 }, + { "label": "", "x": 4.5, "y": 1 }, + { "label": "", "x": 5.5, "y": 1 }, + { "label": "", "x": 6.5, "y": 1 }, + { "label": "", "x": 7.5, "y": 1 }, + { "label": "", "x": 8.5, "y": 1 }, + { "label": "", "x": 9.5, "y": 1 }, + { "label": "", "x": 10.5, "y": 1 }, + { "label": "", "x": 11.5, "y": 1 }, + { "label": "", "x": 12.5, "y": 1 }, + { "label": "", "x": 13.5, "y": 1, "w": 1.5 }, + { "label": "", "x": 15, "y": 1 }, + { "label": "", "x": 0, "y": 2, "w": 1.75 }, + { "label": "", "x": 1.75, "y": 2 }, + { "label": "", "x": 2.75, "y": 2 }, + { "label": "", "x": 3.75, "y": 2 }, + { "label": "", "x": 4.75, "y": 2 }, + { "label": "", "x": 5.75, "y": 2 }, + { "label": "", "x": 6.75, "y": 2 }, + { "label": "", "x": 7.75, "y": 2 }, + { "label": "", "x": 8.75, "y": 2 }, + { "label": "", "x": 9.75, "y": 2 }, + { "label": "", "x": 10.75, "y": 2 }, + { "label": "", "x": 11.75, "y": 2 }, + { "label": "", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "", "x": 15, "y": 2 }, + { "label": "", "x": 0, "y": 3, "w": 2.25 }, + { "label": "", "x": 2.25, "y": 3 }, + { "label": "", "x": 3.25, "y": 3 }, + { "label": "", "x": 4.25, "y": 3 }, + { "label": "", "x": 5.25, "y": 3 }, + { "label": "", "x": 6.25, "y": 3 }, + { "label": "", "x": 7.25, "y": 3 }, + { "label": "", "x": 8.25, "y": 3 }, + { "label": "", "x": 9.25, "y": 3 }, + { "label": "", "x": 10.25, "y": 3 }, + { "label": "", "x": 11.25, "y": 3 }, + { "label": "", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "", "x": 14, "y": 3 }, + { "label": "", "x": 15, "y": 3 }, + { "label": "", "x": 0, "y": 4, "w": 1.25 }, + { "label": "", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "", "x": 3.75, "y": 4, "w": 2.25 }, + { "label": "", "x": 6, "y": 4, "w": 1.25 }, + { "label": "", "x": 7.25, "y": 4, "w": 2.75 }, + { "label": "", "x": 10, "y": 4, "w": 1.25 }, + { "label": "", "x": 11.25, "y": 4, "w": 1.25 }, + { "label": "", "x": 13, "y": 4 }, + { "label": "", "x": 14, "y": 4 }, + { "label": "", "x": 15, "y": 4 } + ] + }, + "LAYOUT_via_rotary": { + "layout": [ + { "label": "", "x": 0, "y": 0.75 }, + { "label": "", "x": 1, "y": 0.75 }, + { "label": "", "x": 2, "y": 0.75 }, + { "label": "", "x": 3, "y": 0.75 }, + { "label": "", "x": 4, "y": 0.75 }, + { "label": "", "x": 5, "y": 0.75 }, + { "label": "", "x": 6, "y": 0.75 }, + { "label": "", "x": 7, "y": 0.75 }, + { "label": "", "x": 8, "y": 0.75 }, + { "label": "", "x": 9, "y": 0.75 }, + { "label": "", "x": 10, "y": 0.75 }, + { "label": "", "x": 11, "y": 0.75 }, + { "label": "", "x": 12, "y": 0.75 }, + { "label": "", "x": 13, "y": 0.75 }, + { "label": "", "x": 14, "y": 0.75 }, + { "label": "", "x": 15, "y": 0.75 }, + { "label": "", "x": 14.75, "y": 0, "w": 0.75, "h": 0.75 }, + { "label": "", "x": 15.5, "y": 0, "w": 0.75, "h": 0.75 }, + { "label": "", "x": 0, "y": 1.75, "w": 1.5 }, + { "label": "", "x": 1.5, "y": 1.75 }, + { "label": "", "x": 2.5, "y": 1.75 }, + { "label": "", "x": 3.5, "y": 1.75 }, + { "label": "", "x": 4.5, "y": 1.75 }, + { "label": "", "x": 5.5, "y": 1.75 }, + { "label": "", "x": 6.5, "y": 1.75 }, + { "label": "", "x": 7.5, "y": 1.75 }, + { "label": "", "x": 8.5, "y": 1.75 }, + { "label": "", "x": 9.5, "y": 1.75 }, + { "label": "", "x": 10.5, "y": 1.75 }, + { "label": "", "x": 11.5, "y": 1.75 }, + { "label": "", "x": 12.5, "y": 1.75 }, + { "label": "", "x": 13.5, "y": 1.75, "w": 1.5 }, + { "label": "", "x": 15, "y": 1.75 }, + { "label": "", "x": 0, "y": 2.75, "w": 1.75 }, + { "label": "", "x": 1.75, "y": 2.75 }, + { "label": "", "x": 2.75, "y": 2.75 }, + { "label": "", "x": 3.75, "y": 2.75 }, + { "label": "", "x": 4.75, "y": 2.75 }, + { "label": "", "x": 5.75, "y": 2.75 }, + { "label": "", "x": 6.75, "y": 2.75 }, + { "label": "", "x": 7.75, "y": 2.75 }, + { "label": "", "x": 8.75, "y": 2.75 }, + { "label": "", "x": 9.75, "y": 2.75 }, + { "label": "", "x": 10.75, "y": 2.75 }, + { "label": "", "x": 11.75, "y": 2.75 }, + { "label": "", "x": 12.75, "y": 2.75, "w": 2.25 }, + { "label": "", "x": 15, "y": 2.75 }, + { "label": "", "x": 0, "y": 3.75, "w": 2.25 }, + { "label": "", "x": 2.25, "y": 3.75 }, + { "label": "", "x": 3.25, "y": 3.75 }, + { "label": "", "x": 4.25, "y": 3.75 }, + { "label": "", "x": 5.25, "y": 3.75 }, + { "label": "", "x": 6.25, "y": 3.75 }, + { "label": "", "x": 7.25, "y": 3.75 }, + { "label": "", "x": 8.25, "y": 3.75 }, + { "label": "", "x": 9.25, "y": 3.75 }, + { "label": "", "x": 10.25, "y": 3.75 }, + { "label": "", "x": 11.25, "y": 3.75 }, + { "label": "", "x": 12.25, "y": 3.75, "w": 1.75 }, + { "label": "", "x": 14, "y": 3.75 }, + { "label": "", "x": 15, "y": 3.75 }, + { "label": "", "x": 0, "y": 4.75, "w": 1.25 }, + { "label": "", "x": 1.25, "y": 4.75, "w": 1.25 }, + { "label": "", "x": 2.5, "y": 4.75, "w": 1.25 }, + { "label": "", "x": 3.75, "y": 4.75, "w": 2.25 }, + { "label": "", "x": 6, "y": 4.75, "w": 1.25 }, + { "label": "", "x": 7.25, "y": 4.75, "w": 2.75 }, + { "label": "", "x": 10, "y": 4.75, "w": 1.25 }, + { "label": "", "x": 11.25, "y": 4.75, "w": 1.25 }, + { "label": "", "x": 13, "y": 4.75 }, + { "label": "", "x": 14, "y": 4.75 }, + { "label": "", "x": 15, "y": 4.75 } + ] + } + } +} diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/default/keymap.c b/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/default/keymap.c new file mode 100644 index 0000000000..13883d07e4 --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2021 SawnsProjects + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +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_GRV, KC_PSCR, + 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_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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_all( + KC_TRNS, 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_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, 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 + ), + +}; + diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/default/readme.md b/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/default/readme.md new file mode 100644 index 0000000000..33e79b607e --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for krush65 Hotswap diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/via/keymap.c b/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/via/keymap.c new file mode 100644 index 0000000000..d55eb74fb0 --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/via/keymap.c @@ -0,0 +1,60 @@ + /* Copyright 2021 SawnsProjects + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + [0] = LAYOUT_via_rotary( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, KC_PSCR, KC_VOLD ,KC_VOLU, + 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_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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_via_rotary( + KC_TRNS, 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_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, 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, KC_TRNS + ), + [2] = LAYOUT_via_rotary( + 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, 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, 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 + ), + [3] = LAYOUT_via_rotary( + 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, 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, 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 + ), +}; + + +void matrix_scan_user(void) { + encoder_action_unregister(); +} +bool encoder_update_user(uint8_t index, bool clockwise) { + encoder_action_register(index, clockwise); + return false; // override kb default behavior +};
\ No newline at end of file diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/via/readme.md b/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/via/readme.md new file mode 100644 index 0000000000..a03a6d13a9 --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA keymap for krush65 Hotswap diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/via/rules.mk b/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/via/rules.mk new file mode 100644 index 0000000000..a9739430b9 --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +# Added encoder Action +SRC += encoder_actions.c
\ No newline at end of file diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/readme.md b/keyboards/sawnsprojects/krush/krush65/hotswap/readme.md new file mode 100644 index 0000000000..4a256a2ca5 --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/readme.md @@ -0,0 +1,23 @@ +# Krush65 Hotswap + +![Krush65](https://imgur.com/56ZvWUmh.jpg) + +A 65% keyboard PCB made and sold by SawnsProjects with Nuxros in [mechkey.store](https://mechkey.store/blogs/store-updates/introducing-krush-65). + +* Keyboard Maintainer: [Mai The San](https://github.com/MaiTheSan) +* Hardware Supported: Krush65 +* Hardware Availability: [mechkey.store](https://mechkey.store/products/krush-65-hotswap-pcb) + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `RESET` if it is available + +Make example for this keyboard (after setting up your build environment): + + make sawnsprojects/krush/krush65/hotswap:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/rules.mk b/keyboards/sawnsprojects/krush/krush65/hotswap/rules.mk new file mode 100644 index 0000000000..c754f3f5d0 --- /dev/null +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes |