From 12943b2c5ce482304c62da3a87fc6d8b2a485e9c Mon Sep 17 00:00:00 2001 From: David Doan Date: Sat, 19 Oct 2024 18:51:22 -0700 Subject: [PATCH 1/3] added vector keyboard with via keymap --- .../arrayperipherals/vector/keyboard.json | 43 +++++++++++++++++++ .../vector/keymaps/via/keymap.c | 36 ++++++++++++++++ .../vector/keymaps/via/rules.mk | 2 + keyboards/arrayperipherals/vector/readme.md | 27 ++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 keyboards/arrayperipherals/vector/keyboard.json create mode 100644 keyboards/arrayperipherals/vector/keymaps/via/keymap.c create mode 100644 keyboards/arrayperipherals/vector/keymaps/via/rules.mk create mode 100644 keyboards/arrayperipherals/vector/readme.md diff --git a/keyboards/arrayperipherals/vector/keyboard.json b/keyboards/arrayperipherals/vector/keyboard.json new file mode 100644 index 0000000000..06db8b33db --- /dev/null +++ b/keyboards/arrayperipherals/vector/keyboard.json @@ -0,0 +1,43 @@ +{ + "manufacturer": "Array Peripherals", + "keyboard_name": "The Vector", + "maintainer": "daviddoan", + "bootloader": "atmel-dfu", + "dynamic_keymap": { + "layer_count": 2 + }, + "encoder": { + "rotary": [ + {"pin_a": "F0", "pin_b": "F1"} + ] + }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true + }, + "matrix_pins": { + "direct": [ + ["D4", "C6", "D7", "E6", "F7"] + ] + }, + "processor": "atmega32u4", + "url": "https://arrayperipherals.com", + "usb": { + "device_version": "1.0.0", + "pid": "0x4F47", + "vid": "0x4152" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "k01", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "k02", "matrix": [0, 1], "x": 1.25, "y": 0}, + {"label": "k03", "matrix": [0, 2], "x": 2.25, "y": 0}, + {"label": "k04", "matrix": [0, 3], "x": 3.25, "y": 0}, + {"label": "k05", "matrix": [0, 4], "x": 4.5, "y": 0} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/arrayperipherals/vector/keymaps/via/keymap.c b/keyboards/arrayperipherals/vector/keymaps/via/keymap.c new file mode 100644 index 0000000000..e290e37076 --- /dev/null +++ b/keyboards/arrayperipherals/vector/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +/* +Copyright 2024 David Doan + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, TG(1) + ), + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(1) + ), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [1] = {ENCODER_CCW_CW(KC_TRNS, KC_TRNS)}, +}; +#endif // ENCODER_MAP_ENABLE \ No newline at end of file diff --git a/keyboards/arrayperipherals/vector/keymaps/via/rules.mk b/keyboards/arrayperipherals/vector/keymaps/via/rules.mk new file mode 100644 index 0000000000..9a3d144adc --- /dev/null +++ b/keyboards/arrayperipherals/vector/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +ENCODER_MAP_ENABLE = yes +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/arrayperipherals/vector/readme.md b/keyboards/arrayperipherals/vector/readme.md new file mode 100644 index 0000000000..58603fcfd8 --- /dev/null +++ b/keyboards/arrayperipherals/vector/readme.md @@ -0,0 +1,27 @@ +# The Vector Macropad + +![The Vector](https://i.imgur.com/rmy76bp.png) + +A small (1x4) macropad with a rotary. [More info at arrayperipherals.com](https://www.arrayperipherals.com/) + +* Keyboard Maintainer: [David Doan](https://github.com/daviddoan) +* Hardware Supported: Custom PCB with Atmega32u4 processor +* Hardware Availability: [arrayperipherals.com](https://www.arrayperipherals.com/) + +Make example for this keyboard (after setting up your build environment): + + make arrayperipherals/vector:default + +Flashing example for this keyboard: + + make arrayperipherals/vector: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). + +## Bootloader + +Enter the bootloader in 2 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (left most from the rotary) +* **Physical reset button**: Briefly double press the button on the back of the PCB \ No newline at end of file From b6e744d96859281b033c2293be5e4ab4e73b2daa Mon Sep 17 00:00:00 2001 From: David Doan Date: Wed, 23 Oct 2024 20:20:25 -0700 Subject: [PATCH 2/3] Delete keyboards/arrayperipherals/vector/keyboard.json --- .../arrayperipherals/vector/keyboard.json | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 keyboards/arrayperipherals/vector/keyboard.json diff --git a/keyboards/arrayperipherals/vector/keyboard.json b/keyboards/arrayperipherals/vector/keyboard.json deleted file mode 100644 index 06db8b33db..0000000000 --- a/keyboards/arrayperipherals/vector/keyboard.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "manufacturer": "Array Peripherals", - "keyboard_name": "The Vector", - "maintainer": "daviddoan", - "bootloader": "atmel-dfu", - "dynamic_keymap": { - "layer_count": 2 - }, - "encoder": { - "rotary": [ - {"pin_a": "F0", "pin_b": "F1"} - ] - }, - "features": { - "bootmagic": true, - "encoder": true, - "extrakey": true, - "mousekey": true - }, - "matrix_pins": { - "direct": [ - ["D4", "C6", "D7", "E6", "F7"] - ] - }, - "processor": "atmega32u4", - "url": "https://arrayperipherals.com", - "usb": { - "device_version": "1.0.0", - "pid": "0x4F47", - "vid": "0x4152" - }, - "layouts": { - "LAYOUT": { - "layout": [ - {"label": "k01", "matrix": [0, 0], "x": 0, "y": 0}, - {"label": "k02", "matrix": [0, 1], "x": 1.25, "y": 0}, - {"label": "k03", "matrix": [0, 2], "x": 2.25, "y": 0}, - {"label": "k04", "matrix": [0, 3], "x": 3.25, "y": 0}, - {"label": "k05", "matrix": [0, 4], "x": 4.5, "y": 0} - ] - } - } -} \ No newline at end of file From 156953047f2c9000f6e7366e2b9294e7c4890856 Mon Sep 17 00:00:00 2001 From: David Doan Date: Wed, 23 Oct 2024 20:20:55 -0700 Subject: [PATCH 3/3] Delete keyboards/arrayperipherals/vector/readme.md --- keyboards/arrayperipherals/vector/readme.md | 27 --------------------- 1 file changed, 27 deletions(-) delete mode 100644 keyboards/arrayperipherals/vector/readme.md diff --git a/keyboards/arrayperipherals/vector/readme.md b/keyboards/arrayperipherals/vector/readme.md deleted file mode 100644 index 58603fcfd8..0000000000 --- a/keyboards/arrayperipherals/vector/readme.md +++ /dev/null @@ -1,27 +0,0 @@ -# The Vector Macropad - -![The Vector](https://i.imgur.com/rmy76bp.png) - -A small (1x4) macropad with a rotary. [More info at arrayperipherals.com](https://www.arrayperipherals.com/) - -* Keyboard Maintainer: [David Doan](https://github.com/daviddoan) -* Hardware Supported: Custom PCB with Atmega32u4 processor -* Hardware Availability: [arrayperipherals.com](https://www.arrayperipherals.com/) - -Make example for this keyboard (after setting up your build environment): - - make arrayperipherals/vector:default - -Flashing example for this keyboard: - - make arrayperipherals/vector: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). - -## Bootloader - -Enter the bootloader in 2 ways: - -* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (left most from the rotary) -* **Physical reset button**: Briefly double press the button on the back of the PCB \ No newline at end of file