36008922f8456694d45d2c36500dfba3c4271b09

Author
David Doan <daviddoan1995@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

add vector macropad (#24487)

Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: jack <jack@pngu.org>
Co-authored-by: Ryan <fauxpark@gmail.com>

Diff

This diff is truncated to protect this page.

  1diff --git a/keyboards/arrayperipherals/vector/keyboard.json b/keyboards/arrayperipherals/vector/keyboard.json
  2new file mode 100644
  3index 0000000000000000000000000000000000000000..505199831d5acf3d11caec41f18a1766806a8fe6
  4--- /dev/null
  5+++ b/keyboards/arrayperipherals/vector/keyboard.json
  6@@ -0,0 +1,40 @@
  7+{
  8+    "manufacturer": "Array Peripherals",
  9+    "keyboard_name": "The Vector",
 10+    "maintainer": "daviddoan",
 11+    "bootloader": "atmel-dfu",
 12+    "encoder": {
 13+        "rotary": [
 14+            {"pin_a": "F0", "pin_b": "F1"}
 15+        ]
 16+    },
 17+    "features": {
 18+        "bootmagic": true,
 19+        "encoder": true,
 20+        "extrakey": true,
 21+        "mousekey": true
 22+    },
 23+    "matrix_pins": {
 24+        "direct": [
 25+            ["D4", "C6", "D7", "E6", "F7"]
 26+        ]
 27+    },
 28+    "processor": "atmega32u4",
 29+    "url": "https://arrayperipherals.com",
 30+    "usb": {
 31+        "device_version": "1.0.0",
 32+        "pid": "0x4F47",
 33+        "vid": "0x4152"
 34+    },
 35+    "layouts": {
 36+        "LAYOUT": {
 37+            "layout": [
 38+                {"label": "k01", "matrix": [0, 0], "x": 0, "y": 0},
 39+                {"label": "k02", "matrix": [0, 1], "x": 1, "y": 0},
 40+                {"label": "k03", "matrix": [0, 2], "x": 2, "y": 0},
 41+                {"label": "k04", "matrix": [0, 3], "x": 3, "y": 0},
 42+                {"label": "k05", "matrix": [0, 4], "x": 4.25, "y": 0}
 43+            ]
 44+        }
 45+    }
 46+}
 47diff --git a/keyboards/arrayperipherals/vector/keymaps/default/keymap.c b/keyboards/arrayperipherals/vector/keymaps/default/keymap.c
 48new file mode 100644
 49index 0000000000000000000000000000000000000000..e290e37076466c0097b948a7c5950b3d8d31cbc5
 50--- /dev/null
 51+++ b/keyboards/arrayperipherals/vector/keymaps/default/keymap.c
 52@@ -0,0 +1,36 @@
 53+/*
 54+Copyright 2024 David Doan <daviddoan1995@gmail.com>
 55+
 56+This program is free software: you can redistribute it and/or modify
 57+it under the terms of the GNU General Public License as published by
 58+the Free Software Foundation, either version 2 of the License, or
 59+(at your option) any later version.
 60+
 61+This program is distributed in the hope that it will be useful,
 62+but WITHOUT ANY WARRANTY; without even the implied warranty of
 63+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 64+GNU General Public License for more details.
 65+
 66+You should have received a copy of the GNU General Public License
 67+along with this program.  If not, see <http://www.gnu.org/licenses/>.
 68+*/
 69+
 70+#include QMK_KEYBOARD_H
 71+
 72+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 73+  
 74+  [0] = LAYOUT(
 75+     KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, TG(1)
 76+   ),
 77+
 78+  [1] = LAYOUT(
 79+     KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(1)
 80+  ),
 81+};
 82+
 83+#if defined(ENCODER_MAP_ENABLE)
 84+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
 85+    [0] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
 86+    [1] = {ENCODER_CCW_CW(KC_TRNS, KC_TRNS)},
 87+};
 88+#endif // ENCODER_MAP_ENABLE
 89diff --git a/keyboards/arrayperipherals/vector/keymaps/default/rules.mk b/keyboards/arrayperipherals/vector/keymaps/default/rules.mk
 90new file mode 100644
 91index 0000000000000000000000000000000000000000..a40474b4d5c71c0cb5b821bec0ab63c175cdc43d
 92--- /dev/null
 93+++ b/keyboards/arrayperipherals/vector/keymaps/default/rules.mk
 94@@ -0,0 +1 @@
 95+ENCODER_MAP_ENABLE = yes
 96diff --git a/keyboards/arrayperipherals/vector/readme.md b/keyboards/arrayperipherals/vector/readme.md
 97new file mode 100644
 98index 0000000000000000000000000000000000000000..dee7dc8f9a16b2548b9d284fcd92409d042460cb
 99--- /dev/null
100+++ b/keyboards/arrayperipherals/vector/readme.md
101@@ -0,0 +1,26 @@
102+# The Vector Macropad
103+
104+![The Vector](https://i.imgur.com/rmy76bp.png)
105+
106+A small (1x4) macropad with a rotary. [More info at arrayperipherals.com](https://www.arrayperipherals.com/)
107+
108+* Keyboard Maintainer: [David Doan](https://github.com/daviddoan)
109+* Hardware Supported: Custom PCB with Atmega32u4 processor
110+* Hardware Availability: [arrayperipherals.com](https://www.arrayperipherals.com/)
111+
112+Make example for this keyboard (after setting up your build environment):
113+
114+    make arrayperipherals/vector:default
115+
116+Flashing example for this keyboard:
117+
118+    make arrayperipherals/vector:default:flash
119+