From 7b5d7907df3b2e5871aa627cd02359879f04b42d Mon Sep 17 00:00:00 2001
From: c0ldbru <dennisp98@gmail.com>
Date: Fri, 12 Jul 2024 22:11:00 -0400
Subject: [PATCH] adds veilid SAO macropad (#23868)

Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: c0ldbru <c0ldbrusec@gmail.com>
---
 keyboards/rot13labs/veilid_sao/keyboard.json  | 50 +++++++++++++++++++
 .../veilid_sao/keymaps/default/keymap.c       | 32 ++++++++++++
 keyboards/rot13labs/veilid_sao/readme.md      | 18 +++++++
 3 files changed, 100 insertions(+)
 create mode 100644 keyboards/rot13labs/veilid_sao/keyboard.json
 create mode 100755 keyboards/rot13labs/veilid_sao/keymaps/default/keymap.c
 create mode 100644 keyboards/rot13labs/veilid_sao/readme.md

diff --git a/keyboards/rot13labs/veilid_sao/keyboard.json b/keyboards/rot13labs/veilid_sao/keyboard.json
new file mode 100644
index 0000000000..751345d264
--- /dev/null
+++ b/keyboards/rot13labs/veilid_sao/keyboard.json
@@ -0,0 +1,50 @@
+{
+    "manufacturer": "rot13labs",
+    "keyboard_name": "Veilid SAO",
+    "maintainer": "c0ldbru",
+    "bootloader": "usbasploader",
+    "diode_direction": "COL2ROW",
+    "features": {
+        "bootmagic": true,
+        "command": false,
+        "console": false,
+        "extrakey": false,
+        "mousekey": false,
+        "nkro": false,
+        "rgb_matrix": true
+    },
+    "matrix_pins": {
+        "cols": ["C0"],
+        "rows": ["B1"]
+    },
+    "processor": "atmega328p",
+    "usb": {
+        "device_version": "13.3.7",
+        "pid": "0xBEEF",
+        "vid": "0xBEEF"
+    }, 
+    "ws2812": {
+        "pin": "B0"
+    },
+    "rgb_matrix": {
+        "animations": {
+            "cycle_left_right": true
+        },
+        "driver": "ws2812",
+        "default": {
+            "animation": "cycle_left_right"
+        },
+        "layout": [
+            {"flags": 4, "matrix": [0, 0], "x": 0,   "y": 0}
+        ],
+        "max_brightness": 100
+    },
+    "community_layouts": ["ortho_1x1"],
+    "layouts": {
+        "LAYOUT_ortho_1x1": {
+            "layout": [
+                {"label": "Ctrl", "matrix": [0, 0], "x": 0, "y": 0}
+              ]
+        }
+    }
+}
diff --git a/keyboards/rot13labs/veilid_sao/keymaps/default/keymap.c b/keyboards/rot13labs/veilid_sao/keymaps/default/keymap.c
new file mode 100755
index 0000000000..e8afbe3224
--- /dev/null
+++ b/keyboards/rot13labs/veilid_sao/keymaps/default/keymap.c
@@ -0,0 +1,32 @@
+/*
+Copyright 2012,2013 gezhaoyou <gezhaoyou@126.com>
+
+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
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+    switch (keycode) {
+    case QK_USER_1:
+        if (record->event.pressed) {            
+            SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_SPACE) SS_UP(X_LGUI) SS_DELAY(1000) SS_TAP(X_LGUI) SS_DELAY(1000) "terminal" SS_DELAY(1000) SS_TAP(X_ENTER) SS_DELAY(1000) "open https://veilid.com\n" SS_DELAY(1000) "start https://veilid.com\n");
+        }
+        break;
+    }
+    return true;
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  [0] = LAYOUT_ortho_1x1(QK_USER_1),
+};
\ No newline at end of file
diff --git a/keyboards/rot13labs/veilid_sao/readme.md b/keyboards/rot13labs/veilid_sao/readme.md
new file mode 100644
index 0000000000..a1cc93e212
--- /dev/null
+++ b/keyboards/rot13labs/veilid_sao/readme.md
@@ -0,0 +1,18 @@
+# veilid_sao
+
+A customizable 1 key SAO macropad from rot13labs to support Veilid
+
+* Keyboard Maintainer: [c0ldbru](https://github.com/c0ldbru)
+* Hardware Supported: veilid_sao // atmega328p
+* Hardware Availability: [rot13labs](https://rot13labs.com)
+* Support Veilid: [Veilid](https://veilid.com/)
+
+Make example for this keyboard (after setting up your build environment):
+
+    make rot13labs/veilid_sao: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).
+
+## Bootloader
+
+You can enter the bootloader to flash on new firmware by holding down the CTRL key while plugging the Veilid SAO in.