diff options
Diffstat (limited to 'keyboards/yeehaw')
-rw-r--r-- | keyboards/yeehaw/config.h | 50 | ||||
-rw-r--r-- | keyboards/yeehaw/info.json | 12 | ||||
-rw-r--r-- | keyboards/yeehaw/keymaps/default/keymap.c | 71 | ||||
-rw-r--r-- | keyboards/yeehaw/keymaps/via/keymap.c | 90 | ||||
-rw-r--r-- | keyboards/yeehaw/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/yeehaw/readme.md | 22 | ||||
-rw-r--r-- | keyboards/yeehaw/rules.mk | 20 | ||||
-rw-r--r-- | keyboards/yeehaw/yeehaw.c | 16 | ||||
-rw-r--r-- | keyboards/yeehaw/yeehaw.h | 25 |
9 files changed, 307 insertions, 0 deletions
diff --git a/keyboards/yeehaw/config.h b/keyboards/yeehaw/config.h new file mode 100644 index 0000000000..c13c70eae9 --- /dev/null +++ b/keyboards/yeehaw/config.h @@ -0,0 +1,50 @@ +/* Copyright 2021 Caleb Lightfoot + * + * 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 0x5351 +#define PRODUCT_ID 0x5458 +#define DEVICE_VER 0x0100 +#define MANUFACTURER squashkb +#define PRODUCT Yeehaw + + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 14 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ +{ D2, D4, C6, E6, F5, B1, D3, D7, B4, F6, B3, B5, F7, F4 } \ +} + +#define ENCODERS_PAD_A { D1 } +#define ENCODERS_PAD_B { D0 } + +#define RGB_DI_PIN B2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 7 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* 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_ANIMATIONS +#endif diff --git a/keyboards/yeehaw/info.json b/keyboards/yeehaw/info.json new file mode 100644 index 0000000000..d121b07b98 --- /dev/null +++ b/keyboards/yeehaw/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Yeehaw", + "url": "https://squashkb.com/product/yeehaw", + "maintainer": "Tsquash", + "width": 5, + "height": 5.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"VOLU", "x":1, "y":0}, {"label":"VOLD", "x":1, "y":1}, {"label":"M1", "x":2, "y":1.5}, {"label":"UP", "x":3, "y":1.5}, {"label":"MNXT", "x":1, "y":2}, {"label":"M2", "x":4, "y":2}, {"label":"LEFT", "x":2, "y":2.5}, {"label":"DOWN", "x":3, "y":2.5}, {"label":"MO(1)", "x":0, "y":2.75}, {"label":"MPRV", "x":1, "y":3}, {"label":"RIGHT", "x":4, "y":3}, {"label":"MPLY", "x":2, "y":3.5}, {"label":"CTL S", "x":3, "y":3.5}, {"label":"RGB TOG", "x":2.5, "y":4.5}] + } + } +}
\ No newline at end of file diff --git a/keyboards/yeehaw/keymaps/default/keymap.c b/keyboards/yeehaw/keymaps/default/keymap.c new file mode 100644 index 0000000000..abcbc838a9 --- /dev/null +++ b/keyboards/yeehaw/keymaps/default/keymap.c @@ -0,0 +1,71 @@ + /* Copyright 2021 Caleb Lightfoot + * + * 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 + +enum custom_keycodes { + YEEHAW = SAFE_RANGE, + SQUASHKB, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_VOLU, + KC_VOLD, + KC_MPRV, YEEHAW, KC_UP, SQUASHKB, + MO(1), KC_MNXT, KC_LEFT, KC_DOWN, KC_RIGHT, + KC_MPLY, LCTL(KC_S), + RGB_TOG + ), + + [1] = LAYOUT( + RGB_HUI, + RGB_HUD, + RGB_SAI, RGB_VAI, RGB_VAD, RGB_SPI, +KC_TRNS, RGB_SAD, RGB_M_P, RGB_MOD, RGB_SPD, + KC_TRNS, KC_TRNS, + RESET + ), + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case YEEHAW: + if (record->event.pressed) { + SEND_STRING("yeehaw!"); + } + break; + + case SQUASHKB: + if (record->event.pressed) { + SEND_STRING("http://squashkb.com"); + } + break; + } + return true; +}; diff --git a/keyboards/yeehaw/keymaps/via/keymap.c b/keyboards/yeehaw/keymaps/via/keymap.c new file mode 100644 index 0000000000..43fc3aee57 --- /dev/null +++ b/keyboards/yeehaw/keymaps/via/keymap.c @@ -0,0 +1,90 @@ + /* Copyright 2021 Caleb Lightfoot + * + * 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 + + +enum custom_keycodes { + YEEHAW = SAFE_RANGE, + SQUASHKB, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_VOLU, + KC_VOLD, + KC_MPRV, YEEHAW, KC_UP, SQUASHKB, + MO(1), KC_MNXT, KC_LEFT, KC_DOWN, KC_RIGHT, + KC_MPLY, LCTL(KC_S), + RGB_TOG + ), + + [1] = LAYOUT( + RGB_HUI, + RGB_HUD, + RGB_SAI, RGB_VAI, RGB_VAD, RGB_SPI, +KC_TRNS, RGB_SAD, RGB_M_P, RGB_MOD, RGB_SPD, + KC_TRNS, KC_TRNS, + RESET + ), + + [2] = LAYOUT( + ____, + ____, + ____, ____, ____, ____, +____, ____, ____, ____, ____, + ____, ____, + ____ + ), + + [3] = LAYOUT( + ____, + ____, + ____, ____, ____, ____, +____, ____, ____, ____, ____, + ____, ____, + ____ + ), + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case YEEHAW: + if (record->event.pressed) { + SEND_STRING("yeehaw!"); + } + break; + + case SQUASHKB: + if (record->event.pressed) { + SEND_STRING("http://squashkb.com"); + } + break; + } + return true; +}; diff --git a/keyboards/yeehaw/keymaps/via/rules.mk b/keyboards/yeehaw/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/yeehaw/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/yeehaw/readme.md b/keyboards/yeehaw/readme.md new file mode 100644 index 0000000000..1435254d03 --- /dev/null +++ b/keyboards/yeehaw/readme.md @@ -0,0 +1,22 @@ +# Yee-Haw Macro Pad + +![Yeehaw](https://imgur.com/a/P6eSrcy) + +A 14 key macro pad in the shape of Texas. + +* Keyboard Maintainer: [Caleb Lightfoot](https://github.com/Tsquash) +* Hardware Supported: Yee-Haw PCB v1.0 +* Hardware Availability: [squashkb](https://www.squashkb.com) + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb yeehaw -km default + +To reset the keyboard, press the physical reset button located on the back of the PCB. + +Install example for this keyboard: + + qmk flash -kb yeehaw -km 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/yeehaw/rules.mk b/keyboards/yeehaw/rules.mk new file mode 100644 index 0000000000..3fc8514b5a --- /dev/null +++ b/keyboards/yeehaw/rules.mk @@ -0,0 +1,20 @@ +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +ENCODER_ENABLE = yes diff --git a/keyboards/yeehaw/yeehaw.c b/keyboards/yeehaw/yeehaw.c new file mode 100644 index 0000000000..3c8a29cade --- /dev/null +++ b/keyboards/yeehaw/yeehaw.c @@ -0,0 +1,16 @@ +/* Copyright 2021 Caleb Lightfoot + * + * 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 "yeehaw.h" diff --git a/keyboards/yeehaw/yeehaw.h b/keyboards/yeehaw/yeehaw.h new file mode 100644 index 0000000000..0d63efab97 --- /dev/null +++ b/keyboards/yeehaw/yeehaw.h @@ -0,0 +1,25 @@ +/* Copyright 2021 Caleb Lightfoot + * + * 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" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, K013 \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, K013 } \ + } + |