diff --git a/keyboards/handwired/maverick0197/keydeck8/info.json b/keyboards/handwired/maverick0197/keydeck8/info.json new file mode 100644 index 000000000000..d70b262c04eb --- /dev/null +++ b/keyboards/handwired/maverick0197/keydeck8/info.json @@ -0,0 +1,38 @@ +{ + "keyboard_name": "keydeck8", + "manufacturer": "Maverick0197", + "maintainer": "Maverick0197", + "development_board": "promicro", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "encoder": true + }, + "encoder": { + "rotary": [ + { "pin_a": "D3", "pin_b": "D2", "resolution": 4 } + ] + }, + "matrix_pins": { + "direct": [ + ["D0", "D1", "D4"], + ["C6", "D7", "E6"], + ["B4", "B5", "B6"] + ] + }, + "usb": { + "device_version": "0.0.1", + "pid": "0x3031", + "vid": "0x4D76" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"D0", "matrix": [0, 0], "x":0, "y":0}, {"label":"D1", "matrix": [0, 1], "x":1, "y":0}, {"label":"D4", "matrix": [0, 2], "x":2, "y":0}, + {"label":"C6", "matrix": [1, 0], "x":0, "y":1}, {"label":"D7", "matrix": [1, 1], "x":1, "y":1}, {"label":"E6", "matrix": [1, 2], "x":2, "y":1}, + {"label":"B4", "matrix": [2, 0], "x":0, "y":2}, {"label":"B5", "matrix": [2, 1], "x":1, "y":2}, {"label":"B6", "matrix": [2, 2], "x":2, "y":2} + ] + } + } +} diff --git a/keyboards/handwired/maverick0197/keydeck8/keydeck8.c b/keyboards/handwired/maverick0197/keydeck8/keydeck8.c new file mode 100644 index 000000000000..663306a9bb2a --- /dev/null +++ b/keyboards/handwired/maverick0197/keydeck8/keydeck8.c @@ -0,0 +1,33 @@ +/* Copyright 2023 Maverick0197 + * + * 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 . + */ + +#include "quantum.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 false; +}; +#endif // ENCODER_MAP_ENABLE diff --git a/keyboards/handwired/maverick0197/keydeck8/keymaps/default/keymap.c b/keyboards/handwired/maverick0197/keydeck8/keymaps/default/keymap.c new file mode 100644 index 000000000000..2d4b4eb8c545 --- /dev/null +++ b/keyboards/handwired/maverick0197/keydeck8/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2023 Maverick0197 + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +// clang-format off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, + KC_1, KC_2, KC_3, + KC_4, KC_5, KC_6) +}; +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; +#endif // ENCODER_MAP_ENABLE + +// clang-format on diff --git a/keyboards/handwired/maverick0197/keydeck8/keymaps/default/rules.mk b/keyboards/handwired/maverick0197/keydeck8/keymaps/default/rules.mk new file mode 100644 index 000000000000..ee325681483f --- /dev/null +++ b/keyboards/handwired/maverick0197/keydeck8/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/handwired/maverick0197/keydeck8/keymaps/via/keymap.c b/keyboards/handwired/maverick0197/keydeck8/keymaps/via/keymap.c new file mode 100644 index 000000000000..d9e409a1a923 --- /dev/null +++ b/keyboards/handwired/maverick0197/keydeck8/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2023 Maverick0197 + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +// clang-format off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, + KC_1, KC_2, KC_3, + KC_4, KC_5, KC_6 + ), + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; +#endif // ENCODER_MAP_ENABLE + +// clang-format on diff --git a/keyboards/handwired/maverick0197/keydeck8/keymaps/via/rules.mk b/keyboards/handwired/maverick0197/keydeck8/keymaps/via/rules.mk new file mode 100644 index 000000000000..f1adcab005e8 --- /dev/null +++ b/keyboards/handwired/maverick0197/keydeck8/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/handwired/maverick0197/keydeck8/readme.md b/keyboards/handwired/maverick0197/keydeck8/readme.md new file mode 100644 index 000000000000..d72caa9cc985 --- /dev/null +++ b/keyboards/handwired/maverick0197/keydeck8/readme.md @@ -0,0 +1,40 @@ +# KeyDeck8 + +Firmware for obscuresausage's Multimedia Key Deck. + +8 keys and and encoder powered by a Pro Micro. + +[Multimedia Key Deck model Files](https://www.printables.com/model/389352-multimedia-key-deck) + + +![KeyDeck8](https://i.imgur.com/6G2LPLzl.jpg) + +--- +Wiring Diagram: + +![KeyDeck8 Wiring Diagram](https://i.imgur.com/1sOvYRUl.jpg) + + +Pinouts for Pro Micro: + +![Promicro Pinout Guide](https://i.imgur.com/LZ194Hfl.jpg) + +--- +* Keyboard Maintainer: [Maverick0197](https://github.com/Maverick0197) +* Hardware Supported: Pro Micro +* Printed enclosure +* Handwired +* Requires a Pro Micro, 8 key switches and 1 KY040 encoder +* Hardware Availability: [Make it yourself](https://github.com/Maverick0197/KeyDeck8) + +--- +Make example for this keyboard (after setting up your build environment): + + make handwired/maverick0197/keydeck8:default:flash + +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). + +--- +Revision 0.0.1: +- +Initial release. diff --git a/keyboards/handwired/maverick0197/keydeck8/rules.mk b/keyboards/handwired/maverick0197/keydeck8/rules.mk new file mode 100644 index 000000000000..6e7633bfe015 --- /dev/null +++ b/keyboards/handwired/maverick0197/keydeck8/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank