diff options
author | Caleb Lightfoot <61706196+Tsquash@users.noreply.github.com> | 2021-05-17 10:52:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 11:52:01 -0400 |
commit | 3bee24a8275eba13ada7e22b94cc96649c05e96f (patch) | |
tree | 999cbe47f1f3bd8e980d9941f222259f039cab0c | |
parent | f7c6d68b3443e242cd658e2913d16db8b2318e03 (diff) | |
download | qmk_firmware-3bee24a8275eba13ada7e22b94cc96649c05e96f.tar.gz qmk_firmware-3bee24a8275eba13ada7e22b94cc96649c05e96f.zip |
Add Yeehaw Keyboard (#12705)
* Add files for Yeehaw keyboard.
* Modified config.h and default keymap.
* Update keyboards/yeehaw/rules.mk
Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
* Update keyboards/yeehaw/readme.md
Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
* Update keyboards/yeehaw/readme.md
Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
* Update keyboards/yeehaw/keymaps/via/keymap.c
Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
* Update keyboards/yeehaw/keymaps/via/keymap.c
Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
* Update keyboards/yeehaw/keymaps/via/keymap.c
Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
* Apply suggestions from georges review
Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
* Remove Unnecessary Defines
Co-authored-by: Drashna Jaelre <drashna@live.com>
* Changed keymap licenses 📃
Co-authored-by: Tsqaushv2 <61706196+Tsqaushv2@users.noreply.github.com>
Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
-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 000000000..c13c70eae --- /dev/null +++ b/keyboards/yeehaw/config.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* Copyright 2021 Caleb Lightfoot | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #pragma once | ||
17 | |||
18 | #include "config_common.h" | ||
19 | |||
20 | /* USB Device descriptor parameter */ | ||
21 | #define VENDOR_ID 0x5351 | ||
22 | #define PRODUCT_ID 0x5458 | ||
23 | #define DEVICE_VER 0x0100 | ||
24 | #define MANUFACTURER squashkb | ||
25 | #define PRODUCT Yeehaw | ||
26 | |||
27 | |||
28 | /* key matrix size */ | ||
29 | #define MATRIX_ROWS 1 | ||
30 | #define MATRIX_COLS 14 | ||
31 | |||
32 | /* Keyboard Matrix Assignments */ | ||
33 | #define DIRECT_PINS { \ | ||
34 | { D2, D4, C6, E6, F5, B1, D3, D7, B4, F6, B3, B5, F7, F4 } \ | ||
35 | } | ||
36 | |||
37 | #define ENCODERS_PAD_A { D1 } | ||
38 | #define ENCODERS_PAD_B { D0 } | ||
39 | |||
40 | #define RGB_DI_PIN B2 | ||
41 | #ifdef RGB_DI_PIN | ||
42 | #define RGBLED_NUM 7 | ||
43 | #define RGBLIGHT_HUE_STEP 8 | ||
44 | #define RGBLIGHT_SAT_STEP 8 | ||
45 | #define RGBLIGHT_VAL_STEP 8 | ||
46 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
47 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
48 | /*== all animations enable ==*/ | ||
49 | #define RGBLIGHT_ANIMATIONS | ||
50 | #endif | ||
diff --git a/keyboards/yeehaw/info.json b/keyboards/yeehaw/info.json new file mode 100644 index 000000000..d121b07b9 --- /dev/null +++ b/keyboards/yeehaw/info.json | |||
@@ -0,0 +1,12 @@ | |||
1 | { | ||
2 | "keyboard_name": "Yeehaw", | ||
3 | "url": "https://squashkb.com/product/yeehaw", | ||
4 | "maintainer": "Tsquash", | ||
5 | "width": 5, | ||
6 | "height": 5.5, | ||
7 | "layouts": { | ||
8 | "LAYOUT": { | ||
9 | "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}] | ||
10 | } | ||
11 | } | ||
12 | } \ 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 000000000..abcbc838a --- /dev/null +++ b/keyboards/yeehaw/keymaps/default/keymap.c | |||
@@ -0,0 +1,71 @@ | |||
1 | /* Copyright 2021 Caleb Lightfoot | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include QMK_KEYBOARD_H | ||
18 | |||
19 | enum custom_keycodes { | ||
20 | YEEHAW = SAFE_RANGE, | ||
21 | SQUASHKB, | ||
22 | }; | ||
23 | |||
24 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
25 | |||
26 | [0] = LAYOUT( | ||
27 | KC_VOLU, | ||
28 | KC_VOLD, | ||
29 | KC_MPRV, YEEHAW, KC_UP, SQUASHKB, | ||
30 | MO(1), KC_MNXT, KC_LEFT, KC_DOWN, KC_RIGHT, | ||
31 | KC_MPLY, LCTL(KC_S), | ||
32 | RGB_TOG | ||
33 | ), | ||
34 | |||
35 | [1] = LAYOUT( | ||
36 | RGB_HUI, | ||
37 | RGB_HUD, | ||
38 | RGB_SAI, RGB_VAI, RGB_VAD, RGB_SPI, | ||
39 | KC_TRNS, RGB_SAD, RGB_M_P, RGB_MOD, RGB_SPD, | ||
40 | KC_TRNS, KC_TRNS, | ||
41 | RESET | ||
42 | ), | ||
43 | |||
44 | }; | ||
45 | |||
46 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
47 | if (index == 0) { /* First encoder */ | ||
48 | if (clockwise) { | ||
49 | tap_code(KC_VOLD); | ||
50 | } else { | ||
51 | tap_code(KC_VOLU); | ||
52 | } | ||
53 | } | ||
54 | } | ||
55 | |||
56 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
57 | switch (keycode) { | ||
58 | case YEEHAW: | ||
59 | if (record->event.pressed) { | ||
60 | SEND_STRING("yeehaw!"); | ||
61 | } | ||
62 | break; | ||
63 | |||
64 | case SQUASHKB: | ||
65 | if (record->event.pressed) { | ||
66 | SEND_STRING("http://squashkb.com"); | ||
67 | } | ||
68 | break; | ||
69 | } | ||
70 | return true; | ||
71 | }; | ||
diff --git a/keyboards/yeehaw/keymaps/via/keymap.c b/keyboards/yeehaw/keymaps/via/keymap.c new file mode 100644 index 000000000..43fc3aee5 --- /dev/null +++ b/keyboards/yeehaw/keymaps/via/keymap.c | |||
@@ -0,0 +1,90 @@ | |||
1 | /* Copyright 2021 Caleb Lightfoot | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include QMK_KEYBOARD_H | ||
18 | |||
19 | |||
20 | enum custom_keycodes { | ||
21 | YEEHAW = SAFE_RANGE, | ||
22 | SQUASHKB, | ||
23 | }; | ||
24 | |||
25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
26 | |||
27 | [0] = LAYOUT( | ||
28 | KC_VOLU, | ||
29 | KC_VOLD, | ||
30 | KC_MPRV, YEEHAW, KC_UP, SQUASHKB, | ||
31 | MO(1), KC_MNXT, KC_LEFT, KC_DOWN, KC_RIGHT, | ||
32 | KC_MPLY, LCTL(KC_S), | ||
33 | RGB_TOG | ||
34 | ), | ||
35 | |||
36 | [1] = LAYOUT( | ||
37 | RGB_HUI, | ||
38 | RGB_HUD, | ||
39 | RGB_SAI, RGB_VAI, RGB_VAD, RGB_SPI, | ||
40 | KC_TRNS, RGB_SAD, RGB_M_P, RGB_MOD, RGB_SPD, | ||
41 | KC_TRNS, KC_TRNS, | ||
42 | RESET | ||
43 | ), | ||
44 | |||
45 | [2] = LAYOUT( | ||
46 | ____, | ||
47 | ____, | ||
48 | ____, ____, ____, ____, | ||
49 | ____, ____, ____, ____, ____, | ||
50 | ____, ____, | ||
51 | ____ | ||
52 | ), | ||
53 | |||
54 | [3] = LAYOUT( | ||
55 | ____, | ||
56 | ____, | ||
57 | ____, ____, ____, ____, | ||
58 | ____, ____, ____, ____, ____, | ||
59 | ____, ____, | ||
60 | ____ | ||
61 | ), | ||
62 | |||
63 | }; | ||
64 | |||
65 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
66 | if (index == 0) { /* First encoder */ | ||
67 | if (clockwise) { | ||
68 | tap_code(KC_VOLD); | ||
69 | } else { | ||
70 | tap_code(KC_VOLU); | ||
71 | } | ||
72 | } | ||
73 | } | ||
74 | |||
75 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
76 | switch (keycode) { | ||
77 | case YEEHAW: | ||
78 | if (record->event.pressed) { | ||
79 | SEND_STRING("yeehaw!"); | ||
80 | } | ||
81 | break; | ||
82 | |||
83 | case SQUASHKB: | ||
84 | if (record->event.pressed) { | ||
85 | SEND_STRING("http://squashkb.com"); | ||
86 | } | ||
87 | break; | ||
88 | } | ||
89 | return true; | ||
90 | }; | ||
diff --git a/keyboards/yeehaw/keymaps/via/rules.mk b/keyboards/yeehaw/keymaps/via/rules.mk new file mode 100644 index 000000000..036bd6d1c --- /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 000000000..1435254d0 --- /dev/null +++ b/keyboards/yeehaw/readme.md | |||
@@ -0,0 +1,22 @@ | |||
1 | # Yee-Haw Macro Pad | ||
2 | |||
3 |  | ||
4 | |||
5 | A 14 key macro pad in the shape of Texas. | ||
6 | |||
7 | * Keyboard Maintainer: [Caleb Lightfoot](https://github.com/Tsquash) | ||
8 | * Hardware Supported: Yee-Haw PCB v1.0 | ||
9 | * Hardware Availability: [squashkb](https://www.squashkb.com) | ||
10 | |||
11 | Make example for this keyboard (after setting up your build environment): | ||
12 | |||
13 | qmk compile -kb yeehaw -km default | ||
14 | |||
15 | To reset the keyboard, press the physical reset button located on the back of the PCB. | ||
16 | |||
17 | Install example for this keyboard: | ||
18 | |||
19 | qmk flash -kb yeehaw -km default | ||
20 | |||
21 | |||
22 | 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 000000000..3fc8514b5 --- /dev/null +++ b/keyboards/yeehaw/rules.mk | |||
@@ -0,0 +1,20 @@ | |||
1 | MCU = atmega32u4 | ||
2 | |||
3 | # Bootloader selection | ||
4 | BOOTLOADER = caterina | ||
5 | |||
6 | # Build Options | ||
7 | # change yes to no to disable | ||
8 | # | ||
9 | MOUSEKEY_ENABLE = no # Mouse keys | ||
10 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
11 | CONSOLE_ENABLE = no # Console for debug | ||
12 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
13 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
14 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
15 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
16 | NKRO_ENABLE = no # USB Nkey Rollover | ||
17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
18 | MIDI_ENABLE = no # MIDI support | ||
19 | UNICODE_ENABLE = no # Unicode | ||
20 | ENCODER_ENABLE = yes | ||
diff --git a/keyboards/yeehaw/yeehaw.c b/keyboards/yeehaw/yeehaw.c new file mode 100644 index 000000000..3c8a29cad --- /dev/null +++ b/keyboards/yeehaw/yeehaw.c | |||
@@ -0,0 +1,16 @@ | |||
1 | /* Copyright 2021 Caleb Lightfoot | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include "yeehaw.h" | ||
diff --git a/keyboards/yeehaw/yeehaw.h b/keyboards/yeehaw/yeehaw.h new file mode 100644 index 000000000..0d63efab9 --- /dev/null +++ b/keyboards/yeehaw/yeehaw.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* Copyright 2021 Caleb Lightfoot | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #pragma once | ||
17 | |||
18 | #include "quantum.h" | ||
19 | |||
20 | #define LAYOUT( \ | ||
21 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, K013 \ | ||
22 | ) { \ | ||
23 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, K013 } \ | ||
24 | } | ||
25 | |||