From ff45cee43ea511b2f7065c84cb1ec1a22a738cb0 Mon Sep 17 00:00:00 2001
From: melonbred <61572569+melonbred@users.noreply.github.com>
Date: Tue, 1 Mar 2022 18:40:06 -0800
Subject: [PATCH 1/9] initial commit
---
keyboards/pegasus/config.h | 87 +++++++++++++++++
keyboards/pegasus/info.json | 100 ++++++++++++++++++++
keyboards/pegasus/keymaps/default/config.h | 20 ++++
keyboards/pegasus/keymaps/default/keymap.c | 86 +++++++++++++++++
keyboards/pegasus/keymaps/default/readme.md | 1 +
keyboards/pegasus/keymaps/split/config.h | 20 ++++
keyboards/pegasus/keymaps/split/keymap.c | 86 +++++++++++++++++
keyboards/pegasus/keymaps/split/readme.md | 1 +
keyboards/pegasus/pegasus.c | 50 ++++++++++
keyboards/pegasus/pegasus.h | 57 +++++++++++
keyboards/pegasus/readme.md | 15 +++
keyboards/pegasus/rules.mk | 24 +++++
12 files changed, 547 insertions(+)
create mode 100644 keyboards/pegasus/config.h
create mode 100644 keyboards/pegasus/info.json
create mode 100644 keyboards/pegasus/keymaps/default/config.h
create mode 100644 keyboards/pegasus/keymaps/default/keymap.c
create mode 100644 keyboards/pegasus/keymaps/default/readme.md
create mode 100644 keyboards/pegasus/keymaps/split/config.h
create mode 100644 keyboards/pegasus/keymaps/split/keymap.c
create mode 100644 keyboards/pegasus/keymaps/split/readme.md
create mode 100644 keyboards/pegasus/pegasus.c
create mode 100644 keyboards/pegasus/pegasus.h
create mode 100644 keyboards/pegasus/readme.md
create mode 100644 keyboards/pegasus/rules.mk
diff --git a/keyboards/pegasus/config.h b/keyboards/pegasus/config.h
new file mode 100644
index 000000000000..b453349089e2
--- /dev/null
+++ b/keyboards/pegasus/config.h
@@ -0,0 +1,87 @@
+/*
+Copyright 2020 melonbred
+
+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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0000
+#define DEVICE_VER 0x0001
+#define MANUFACTURER melonbred
+#define PRODUCT Pegasus
+#define DESCRIPTION 12.75u WKL 40% Keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 12
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+ */
+#define MATRIX_ROW_PINS { F0, F1, F4, E6 }
+#define MATRIX_COL_PINS { D2, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5 }
+//#define UNUSED_PINS { B0, B1, B2, B3, B7 }
+
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+
+/* Rotary Encoder Definitions */
+#define ENCODERS_PAD_A { D0, D5 }
+#define ENCODERS_PAD_B { D1, D3 }
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+
+/* disable these deprecated features by default */
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+
diff --git a/keyboards/pegasus/info.json b/keyboards/pegasus/info.json
new file mode 100644
index 000000000000..238442b8212f
--- /dev/null
+++ b/keyboards/pegasus/info.json
@@ -0,0 +1,100 @@
+{
+ "keyboard_name": "pegasus",
+ "url": "",
+ "maintainer": "melonbred",
+ "layouts": {
+ "LAYOUT_default": {
+ "layout": [
+ {"label":"Esc", "x":0, "y":0},
+ {"label":"Q", "x":1, "y":0},
+ {"label":"W", "x":2, "y":0},
+ {"label":"E", "x":3, "y":0},
+ {"label":"R", "x":4, "y":0},
+ {"label":"T", "x":5, "y":0},
+ {"label":"Y", "x":6, "y":0},
+ {"label":"U", "x":7, "y":0},
+ {"label":"I", "x":8, "y":0},
+ {"label":"O", "x":9, "y":0},
+ {"label":"P", "x":10, "y":0},
+ {"label":"Backspace", "x":11, "y":0, "w":1.75},
+ {"label":"Control", "x":0, "y":1, "w":1.25},
+ {"label":"A", "x":1.25, "y":1},
+ {"label":"S", "x":2.25, "y":1},
+ {"label":"D", "x":3.25, "y":1},
+ {"label":"F", "x":4.25, "y":1},
+ {"label":"G", "x":5.25, "y":1},
+ {"label":"H", "x":6.25, "y":1},
+ {"label":"J", "x":7.25, "y":1},
+ {"label":"K", "x":8.25, "y":1},
+ {"label":"L", "x":9.25, "y":1},
+ {"label":":", "x":10.25, "y":1},
+ {"label":"Enter", "x":11.25, "y":1, "w":1.5},
+ {"label":"Shift", "x":0, "y":2, "w":1.75},
+ {"label":"Z", "x":1.75, "y":2},
+ {"label":"X", "x":2.75, "y":2},
+ {"label":"C", "x":3.75, "y":2},
+ {"label":"V", "x":4.75, "y":2},
+ {"label":"B", "x":5.75, "y":2},
+ {"label":"N", "x":6.75, "y":2},
+ {"label":"M", "x":7.75, "y":2},
+ {"label":"<", "x":8.75, "y":2},
+ {"label":">", "x":9.75, "y":2},
+ {"label":"?", "x":10.75, "y":2},
+ {"label":"Shift", "x":11.75, "y":2},
+ {"label":"Fn", "x":0, "y":3, "w":1.25},
+ {"label":"Alt", "x":2, "y":3, "w":1.25},
+ {"x":3.25, "y":3, "w":6.25},
+ {"label":"Alt", "x":9.5, "y":3, "w":1.25},
+ {"label":"Ctrl", "x":11.5, "y":3, "w":1.25}
+ ]
+ },
+ "LAYOUT_split": {
+ "layout": [
+ {"label":"Esc", "x":0, "y":0},
+ {"label":"Q", "x":1, "y":0},
+ {"label":"W", "x":2, "y":0},
+ {"label":"E", "x":3, "y":0},
+ {"label":"R", "x":4, "y":0},
+ {"label":"T", "x":5, "y":0},
+ {"label":"Y", "x":6, "y":0},
+ {"label":"U", "x":7, "y":0},
+ {"label":"I", "x":8, "y":0},
+ {"label":"O", "x":9, "y":0},
+ {"label":"P", "x":10, "y":0},
+ {"label":"Backspace", "x":11, "y":0, "w":1.75},
+ {"label":"Control", "x":0, "y":1, "w":1.25},
+ {"label":"A", "x":1.25, "y":1},
+ {"label":"S", "x":2.25, "y":1},
+ {"label":"D", "x":3.25, "y":1},
+ {"label":"F", "x":4.25, "y":1},
+ {"label":"G", "x":5.25, "y":1},
+ {"label":"H", "x":6.25, "y":1},
+ {"label":"J", "x":7.25, "y":1},
+ {"label":"K", "x":8.25, "y":1},
+ {"label":"L", "x":9.25, "y":1},
+ {"label":":", "x":10.25, "y":1},
+ {"label":"Enter", "x":11.25, "y":1, "w":1.5},
+ {"label":"Shift", "x":0, "y":2, "w":1.75},
+ {"label":"Z", "x":1.75, "y":2},
+ {"label":"X", "x":2.75, "y":2},
+ {"label":"C", "x":3.75, "y":2},
+ {"label":"V", "x":4.75, "y":2},
+ {"label":"B", "x":5.75, "y":2},
+ {"label":"N", "x":6.75, "y":2},
+ {"label":"M", "x":7.75, "y":2},
+ {"label":"<", "x":8.75, "y":2},
+ {"label":">", "x":9.75, "y":2},
+ {"label":"?", "x":10.75, "y":2},
+ {"label":"Shift", "x":11.75, "y":2},
+ {"label":"Fn", "x":0, "y":3, "w":1.25},
+ {"label":"Alt", "x":2, "y":3, "w":1.25},
+ {"x":3.25, "y":3},
+ {"x":4.25, "y":3, "w":2},
+ {"x":6.25, "y":3, "w":2.25},
+ {"x":8.5, "y":3},
+ {"label":"Alt", "x":9.5, "y":3, "w":1.25},
+ {"label":"Ctrl", "x":11.5, "y":3, "w":1.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/pegasus/keymaps/default/config.h b/keyboards/pegasus/keymaps/default/config.h
new file mode 100644
index 000000000000..d76c709440cb
--- /dev/null
+++ b/keyboards/pegasus/keymaps/default/config.h
@@ -0,0 +1,20 @@
+/* Copyright 2020 melonbred
+ *
+ * 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 .
+ */
+
+#pragma once
+
+// place overrides here
+#define TAPPING_TERM 175
diff --git a/keyboards/pegasus/keymaps/default/keymap.c b/keyboards/pegasus/keymaps/default/keymap.c
new file mode 100644
index 000000000000..7114f84c9348
--- /dev/null
+++ b/keyboards/pegasus/keymaps/default/keymap.c
@@ -0,0 +1,86 @@
+/* Copyright 2020 melonbred
+ *
+ * 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
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _BASE,
+ _LAYER1,
+ _LAYER2
+
+};
+
+// Tap Dance Declarations
+enum {
+ TD_M_D = 0,
+ TD_P_M
+};
+
+// Tap Dance Definition
+qk_tap_dance_action_t tap_dance_actions[] = {
+ //Tap once for minus, tap twice for divide
+ [TD_M_D] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_PSLS),
+ //Tap once for plus, tap twice for multiply
+ [TD_P_M] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_PAST)
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_BIG_SPACE(
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ MO(_LAYER2), KC_LALT, LT(_LAYER1, KC_SPC), KC_RALT, KC_RGUI
+ ),
+
+ [_LAYER1] = LAYOUT_BIG_SPACE(
+ KC_GRV, KC_QUOT, _______, KC_UP, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_DEL,
+ KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PSLS, KC_PMNS, KC_4, KC_5, KC_6, KC_ENT,
+ KC_LSFT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_PAST, KC_PPLS, KC_1, KC_2, KC_3, KC_RSFT,
+ _______, _______, _______, KC_0, KC_PDOT
+ ),
+
+ [_LAYER2] = LAYOUT_BIG_SPACE(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, KC_RALT, KC_RCTL, KC_DEL, KC_VOLD,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY
+ ),
+};
+
+
+
+/* Encoder Definitions */
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ }
+ else if (index == 1) {
+ if (clockwise) {
+ tap_code(KC_PGDN);
+ } else {
+ tap_code(KC_PGUP);
+ }
+ }
+ return false;
+}
+
+
+
diff --git a/keyboards/pegasus/keymaps/default/readme.md b/keyboards/pegasus/keymaps/default/readme.md
new file mode 100644
index 000000000000..170cc76269d3
--- /dev/null
+++ b/keyboards/pegasus/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for pegasus
diff --git a/keyboards/pegasus/keymaps/split/config.h b/keyboards/pegasus/keymaps/split/config.h
new file mode 100644
index 000000000000..d76c709440cb
--- /dev/null
+++ b/keyboards/pegasus/keymaps/split/config.h
@@ -0,0 +1,20 @@
+/* Copyright 2020 melonbred
+ *
+ * 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 .
+ */
+
+#pragma once
+
+// place overrides here
+#define TAPPING_TERM 175
diff --git a/keyboards/pegasus/keymaps/split/keymap.c b/keyboards/pegasus/keymaps/split/keymap.c
new file mode 100644
index 000000000000..deaba1b45d56
--- /dev/null
+++ b/keyboards/pegasus/keymaps/split/keymap.c
@@ -0,0 +1,86 @@
+/* Copyright 2020 melonbred
+ *
+ * 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
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _BASE,
+ _LAYER1,
+ _LAYER2
+
+};
+
+// Tap Dance Declarations
+enum {
+ TD_M_D = 0,
+ TD_P_M
+};
+
+// Tap Dance Definition
+qk_tap_dance_action_t tap_dance_actions[] = {
+ //Tap once for minus, tap twice for divide
+ [TD_M_D] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_PSLS),
+ //Tap once for plus, tap twice for multiply
+ [TD_P_M] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_PAST)
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_SPLIT_SPACE(
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ MO(_LAYER2), KC_LALT, KC_LCTL, KC_SPC, LT(_LAYER1, KC_SPC), KC_RCTL, KC_RALT, KC_RGUI
+ ),
+
+ [_LAYER1] = LAYOUT_SPLIT_SPACE(
+ KC_GRV, KC_QUOT, _______, KC_UP, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_DEL,
+ KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PSLS, KC_PMNS, KC_4, KC_5, KC_6, KC_ENT,
+ KC_LSFT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_PAST, KC_PPLS, KC_1, KC_2, KC_3, KC_RSFT,
+ _______, _______, _______, _______, _______, _______, KC_0, KC_PDOT
+ ),
+
+ [_LAYER2] = LAYOUT_SPLIT_SPACE(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, KC_RALT, KC_RCTL, KC_DEL, KC_VOLD,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY
+ ),
+};
+
+
+
+/* Encoder Definitions */
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ }
+ else if (index == 1) {
+ if (clockwise) {
+ tap_code(KC_PGDN);
+ } else {
+ tap_code(KC_PGUP);
+ }
+ }
+ return false;
+}
+
+
+
diff --git a/keyboards/pegasus/keymaps/split/readme.md b/keyboards/pegasus/keymaps/split/readme.md
new file mode 100644
index 000000000000..170cc76269d3
--- /dev/null
+++ b/keyboards/pegasus/keymaps/split/readme.md
@@ -0,0 +1 @@
+# The default keymap for pegasus
diff --git a/keyboards/pegasus/pegasus.c b/keyboards/pegasus/pegasus.c
new file mode 100644
index 000000000000..dbac507ccec7
--- /dev/null
+++ b/keyboards/pegasus/pegasus.c
@@ -0,0 +1,50 @@
+/* Copyright 2020 melonbred
+ *
+ * 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 "pegasus.h"
+
+// Optional override functions below.
+// You can leave any or all of these undefined.
+// These are only required if you want to perform custom actions.
+
+/*
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+bool led_update_kb(led_t led_state) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ return led_update_user(led_state);
+}
+*/
diff --git a/keyboards/pegasus/pegasus.h b/keyboards/pegasus/pegasus.h
new file mode 100644
index 000000000000..e712676c9d53
--- /dev/null
+++ b/keyboards/pegasus/pegasus.h
@@ -0,0 +1,57 @@
+/* Copyright 2020 melonbred
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+/* This is a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+
+
+#define XXX KC_NO
+
+#define LAYOUT_BIG_SPACE( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K36, K39, K3B \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
+ { K30, K31, XXX, XXX, XXX, XXX, K36, XXX, XXX, K39, XXX, K3B } \
+}
+
+#define LAYOUT_SPLIT_SPACE( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K32, K34, K36, K38, K39, K3B \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
+ { K30, K31, K32, XXX, K34, XXX, K36, XXX, K38, K39, XXX, K3B } \
+}
diff --git a/keyboards/pegasus/readme.md b/keyboards/pegasus/readme.md
new file mode 100644
index 000000000000..0d22bfc6284f
--- /dev/null
+++ b/keyboards/pegasus/readme.md
@@ -0,0 +1,15 @@
+# pegasus
+
+![pegasus](imgur.com image replace me!)
+
+A short description of the keyboard/project
+
+* Keyboard Maintainer: [melonbred](https://github.com/yourusername)
+* Hardware Supported: The PCBs, controllers supported
+* Hardware Availability: Links to where you can find this hardware
+
+Make example for this keyboard (after setting up your build environment):
+
+ make pegasus: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).
diff --git a/keyboards/pegasus/rules.mk b/keyboards/pegasus/rules.mk
new file mode 100644
index 000000000000..1022c7ae9a08
--- /dev/null
+++ b/keyboards/pegasus/rules.mk
@@ -0,0 +1,24 @@
+# MCU name
+MCU = atmega32u4
+
+# Build Options
+# comment out to disable the options.
+#
+
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+CUSTOM_MATRIX = no # Custom matrix file
+BACKLIGHT_ENABLE = no
+RGBLIGHT_ENABLE = no
+WS2812_DRIVER = no
+ENCODER_ENABLE = yes
+TAP_DANCE_ENABLE = yes
+
+
+
+
From 919aa8eeddbc0cb4ab433de2049b9e972a455467 Mon Sep 17 00:00:00 2001
From: melonbred <61572569+melonbred@users.noreply.github.com>
Date: Tue, 1 Mar 2022 19:28:05 -0800
Subject: [PATCH 2/9] update keymaps
---
keyboards/pegasus/keymaps/default/keymap.c | 21 +---
keyboards/pegasus/keymaps/split/keymap.c | 20 +---
keyboards/pegasus/keymaps/vial/config.h | 5 +
keyboards/pegasus/keymaps/vial/keymap.c | 61 +++++++++++
keyboards/pegasus/keymaps/vial/rules.mk | 4 +
keyboards/pegasus/keymaps/vial/vial.json | 115 +++++++++++++++++++++
keyboards/pegasus/pegasus.h | 4 +-
keyboards/pegasus/rules.mk | 1 -
8 files changed, 193 insertions(+), 38 deletions(-)
create mode 100644 keyboards/pegasus/keymaps/vial/config.h
create mode 100644 keyboards/pegasus/keymaps/vial/keymap.c
create mode 100644 keyboards/pegasus/keymaps/vial/rules.mk
create mode 100644 keyboards/pegasus/keymaps/vial/vial.json
diff --git a/keyboards/pegasus/keymaps/default/keymap.c b/keyboards/pegasus/keymaps/default/keymap.c
index 7114f84c9348..a0bc33c6386a 100644
--- a/keyboards/pegasus/keymaps/default/keymap.c
+++ b/keyboards/pegasus/keymaps/default/keymap.c
@@ -23,37 +23,22 @@ enum layer_names {
};
-// Tap Dance Declarations
-enum {
- TD_M_D = 0,
- TD_P_M
-};
-
-// Tap Dance Definition
-qk_tap_dance_action_t tap_dance_actions[] = {
- //Tap once for minus, tap twice for divide
- [TD_M_D] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_PSLS),
- //Tap once for plus, tap twice for multiply
- [TD_P_M] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_PAST)
-};
-
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BASE] = LAYOUT_BIG_SPACE(
+ [_BASE] = LAYOUT_default(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
MO(_LAYER2), KC_LALT, LT(_LAYER1, KC_SPC), KC_RALT, KC_RGUI
),
- [_LAYER1] = LAYOUT_BIG_SPACE(
+ [_LAYER1] = LAYOUT_default(
KC_GRV, KC_QUOT, _______, KC_UP, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_DEL,
KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PSLS, KC_PMNS, KC_4, KC_5, KC_6, KC_ENT,
KC_LSFT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_PAST, KC_PPLS, KC_1, KC_2, KC_3, KC_RSFT,
_______, _______, _______, KC_0, KC_PDOT
),
- [_LAYER2] = LAYOUT_BIG_SPACE(
+ [_LAYER2] = LAYOUT_default(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, KC_RALT, KC_RCTL, KC_DEL, KC_VOLD,
diff --git a/keyboards/pegasus/keymaps/split/keymap.c b/keyboards/pegasus/keymaps/split/keymap.c
index deaba1b45d56..58d4bb6fd208 100644
--- a/keyboards/pegasus/keymaps/split/keymap.c
+++ b/keyboards/pegasus/keymaps/split/keymap.c
@@ -23,37 +23,23 @@ enum layer_names {
};
-// Tap Dance Declarations
-enum {
- TD_M_D = 0,
- TD_P_M
-};
-
-// Tap Dance Definition
-qk_tap_dance_action_t tap_dance_actions[] = {
- //Tap once for minus, tap twice for divide
- [TD_M_D] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_PSLS),
- //Tap once for plus, tap twice for multiply
- [TD_P_M] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_PAST)
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BASE] = LAYOUT_SPLIT_SPACE(
+ [_BASE] = LAYOUT_split(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
MO(_LAYER2), KC_LALT, KC_LCTL, KC_SPC, LT(_LAYER1, KC_SPC), KC_RCTL, KC_RALT, KC_RGUI
),
- [_LAYER1] = LAYOUT_SPLIT_SPACE(
+ [_LAYER1] = LAYOUT_split(
KC_GRV, KC_QUOT, _______, KC_UP, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_DEL,
KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PSLS, KC_PMNS, KC_4, KC_5, KC_6, KC_ENT,
KC_LSFT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_PAST, KC_PPLS, KC_1, KC_2, KC_3, KC_RSFT,
_______, _______, _______, _______, _______, _______, KC_0, KC_PDOT
),
- [_LAYER2] = LAYOUT_SPLIT_SPACE(
+ [_LAYER2] = LAYOUT_split(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, KC_RALT, KC_RCTL, KC_DEL, KC_VOLD,
diff --git a/keyboards/pegasus/keymaps/vial/config.h b/keyboards/pegasus/keymaps/vial/config.h
new file mode 100644
index 000000000000..afdcecffdb6d
--- /dev/null
+++ b/keyboards/pegasus/keymaps/vial/config.h
@@ -0,0 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#pragma once
+
+#define VIAL_KEYBOARD_UID {0x66, 0x38, 0xEC, 0xC0, 0x2F, 0xFC, 0x37, 0xBE}
diff --git a/keyboards/pegasus/keymaps/vial/keymap.c b/keyboards/pegasus/keymaps/vial/keymap.c
new file mode 100644
index 000000000000..07768491d65b
--- /dev/null
+++ b/keyboards/pegasus/keymaps/vial/keymap.c
@@ -0,0 +1,61 @@
+/* Copyright 2020 melonbred
+ *
+ * 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
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _BASE,
+ _LAYER1,
+ _LAYER2,
+ _LAYER3
+
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_default(
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ MO(_LAYER2), KC_LALT, LT(_LAYER1, KC_SPC), KC_RALT, KC_RGUI
+ ),
+
+ [_LAYER1] = LAYOUT_default(
+ KC_GRV, KC_QUOT, _______, KC_UP, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_DEL,
+ KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PSLS, KC_PMNS, KC_4, KC_5, KC_6, KC_ENT,
+ KC_LSFT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_PAST, KC_PPLS, KC_1, KC_2, KC_3, KC_RSFT,
+ _______, _______, _______, KC_0, KC_PDOT
+ ),
+
+ [_LAYER2] = LAYOUT_default(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, KC_RALT, KC_RCTL, KC_DEL, KC_VOLD,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY
+ ),
+
+ [_LAYER3] = LAYOUT_default(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______
+ ),
+};
+
+
+
+
+
diff --git a/keyboards/pegasus/keymaps/vial/rules.mk b/keyboards/pegasus/keymaps/vial/rules.mk
new file mode 100644
index 000000000000..8c0cda1b2a2d
--- /dev/null
+++ b/keyboards/pegasus/keymaps/vial/rules.mk
@@ -0,0 +1,4 @@
+VIA_ENABLE = yes
+VIAL_ENABLE = yes
+VIAL_INSECURE = yes
+VIAL_ENCODERS_ENABLE = yes
diff --git a/keyboards/pegasus/keymaps/vial/vial.json b/keyboards/pegasus/keymaps/vial/vial.json
new file mode 100644
index 000000000000..baed9d0cdeb1
--- /dev/null
+++ b/keyboards/pegasus/keymaps/vial/vial.json
@@ -0,0 +1,115 @@
+{
+ "name": "MelonBred Pegasus",
+ "vendorId": "0x6d62",
+ "productId": "0x6d62",
+ "lighting": "none",
+ "matrix": { "rows": 4, "cols": 12 },
+ "layouts": {
+ "labels": [
+ ["Spacebar Options", "6.25", "2/2.25"]
+ ],
+ "keymap": [
+ [
+ "0,0",
+ "0,1",
+ "0,2",
+ "0,3",
+ "0,4",
+ "0,5",
+ "0,6",
+ "0,7",
+ "0,8",
+ "0,9",
+ "0,10",
+ {
+ "w": 1.75
+ },
+ "0,11"
+ ],
+ [
+ {
+ "x": 2.5,
+ "w": 1.25
+ },
+ "1,0",
+ "1,1",
+ "1,2",
+ "1,3",
+ "1,4",
+ "1,5",
+ "1,6",
+ "1,7",
+ "1,8",
+ "1,9",
+ "1,10",
+ {
+ "w": 1.5
+ },
+ "1,11"
+ ],
+ [
+ {
+ "x": 2.5,
+ "w": 1.75
+ },
+ "2,0",
+ "2,1",
+ "2,2",
+ "2,3",
+ "2,4",
+ "2,5",
+ "2,6",
+ "2,7",
+ "2,8",
+ "2,9",
+ "2,10",
+ "2,11",
+ {
+ "x": 0.5
+ },
+ "1,0\n\n\n\n\n\n\n\n\ne",
+ "1,1\n\n\n\n\n\n\n\n\ne"
+ ],
+ [
+ {
+ "x": 2.5,
+ "w": 1.25
+ },
+ "3,0",
+ {
+ "x": 0.75,
+ "w": 1.25
+ },
+ "3,1",
+ {
+ "w": 6.25
+ },
+ "3,6\n\n\n3,0",
+ {
+ "w": 1.25
+ },
+ "3,9",
+ {
+ "x": 0.75,
+ "w": 1.25
+ },
+ "3,11"
+ ],
+ [
+ {
+ "x": 5.75
+ },
+ "3,2\n\n\n3,1",
+ {
+ "w": 2
+ },
+ "3,4\n\n\n3,1",
+ {
+ "w": 2.25
+ },
+ "3,6\n\n\n3,1",
+ "3,8\n\n\n3,1"
+ ]
+ ]
+ }
+}
diff --git a/keyboards/pegasus/pegasus.h b/keyboards/pegasus/pegasus.h
index e712676c9d53..4582b2ccabbd 100644
--- a/keyboards/pegasus/pegasus.h
+++ b/keyboards/pegasus/pegasus.h
@@ -30,7 +30,7 @@
#define XXX KC_NO
-#define LAYOUT_BIG_SPACE( \
+#define LAYOUT_default( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
@@ -43,7 +43,7 @@
{ K30, K31, XXX, XXX, XXX, XXX, K36, XXX, XXX, K39, XXX, K3B } \
}
-#define LAYOUT_SPLIT_SPACE( \
+#define LAYOUT_split( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
diff --git a/keyboards/pegasus/rules.mk b/keyboards/pegasus/rules.mk
index 1022c7ae9a08..8c5391661f92 100644
--- a/keyboards/pegasus/rules.mk
+++ b/keyboards/pegasus/rules.mk
@@ -17,7 +17,6 @@ BACKLIGHT_ENABLE = no
RGBLIGHT_ENABLE = no
WS2812_DRIVER = no
ENCODER_ENABLE = yes
-TAP_DANCE_ENABLE = yes
From ffd9ab1c09f879cb7222a40255f3596bfbba72d8 Mon Sep 17 00:00:00 2001
From: melonbred <61572569+melonbred@users.noreply.github.com>
Date: Sun, 20 Mar 2022 16:08:26 -0700
Subject: [PATCH 3/9] Update readme.md
---
keyboards/pegasus/readme.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/keyboards/pegasus/readme.md b/keyboards/pegasus/readme.md
index 0d22bfc6284f..d46c07a013a5 100644
--- a/keyboards/pegasus/readme.md
+++ b/keyboards/pegasus/readme.md
@@ -1,10 +1,10 @@
-# pegasus
+# Pegasus
-![pegasus](imgur.com image replace me!)
+![pegasus](https://i.imgur.com/6MKJN7w.jpg)
-A short description of the keyboard/project
+Pegasus is a 40% keyboard with a 12.75u "WKL" layout with 0.75u blockers.
-* Keyboard Maintainer: [melonbred](https://github.com/yourusername)
+* Keyboard Maintainer: [melonbred](https://github.com/melonbred)
* Hardware Supported: The PCBs, controllers supported
* Hardware Availability: Links to where you can find this hardware
From 192d50607f2f1baf0819de704c8a0fce100bbea1 Mon Sep 17 00:00:00 2001
From: melonbred <61572569+melonbred@users.noreply.github.com>
Date: Sun, 20 Mar 2022 16:35:27 -0700
Subject: [PATCH 4/9] Apply suggestions from code review
Co-authored-by: Joel Challis
---
keyboards/pegasus/config.h | 7 -------
keyboards/pegasus/pegasus.c | 33 ---------------------------------
2 files changed, 40 deletions(-)
diff --git a/keyboards/pegasus/config.h b/keyboards/pegasus/config.h
index b453349089e2..6f773da966d3 100644
--- a/keyboards/pegasus/config.h
+++ b/keyboards/pegasus/config.h
@@ -25,7 +25,6 @@ along with this program. If not, see .
#define DEVICE_VER 0x0001
#define MANUFACTURER melonbred
#define PRODUCT Pegasus
-#define DESCRIPTION 12.75u WKL 40% Keyboard
/* key matrix size */
#define MATRIX_ROWS 4
@@ -79,9 +78,3 @@ along with this program. If not, see .
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-
-/* disable these deprecated features by default */
-//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION
-
-
diff --git a/keyboards/pegasus/pegasus.c b/keyboards/pegasus/pegasus.c
index dbac507ccec7..1d08935a35f4 100644
--- a/keyboards/pegasus/pegasus.c
+++ b/keyboards/pegasus/pegasus.c
@@ -15,36 +15,3 @@
*/
#include "pegasus.h"
-
-// Optional override functions below.
-// You can leave any or all of these undefined.
-// These are only required if you want to perform custom actions.
-
-/*
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
-
- matrix_init_user();
-}
-
-void matrix_scan_kb(void) {
- // put your looping keyboard code here
- // runs every cycle (a lot)
-
- matrix_scan_user();
-}
-
-bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- // put your per-action keyboard code here
- // runs for every action, just before processing by the firmware
-
- return process_record_user(keycode, record);
-}
-
-bool led_update_kb(led_t led_state) {
- // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
-
- return led_update_user(led_state);
-}
-*/
From 687573d12308443bb820fed6721a9678a1e66658 Mon Sep 17 00:00:00 2001
From: melonbred <61572569+melonbred@users.noreply.github.com>
Date: Sun, 20 Mar 2022 16:36:31 -0700
Subject: [PATCH 5/9] Commit PR Suggestions
Added BOOTLOADER to rules.mk.
Removed vial keymap
---
keyboards/pegasus/keymaps/vial/config.h | 5 -
keyboards/pegasus/keymaps/vial/keymap.c | 61 ------------
keyboards/pegasus/keymaps/vial/rules.mk | 4 -
keyboards/pegasus/keymaps/vial/vial.json | 115 -----------------------
keyboards/pegasus/rules.mk | 7 +-
5 files changed, 3 insertions(+), 189 deletions(-)
delete mode 100644 keyboards/pegasus/keymaps/vial/config.h
delete mode 100644 keyboards/pegasus/keymaps/vial/keymap.c
delete mode 100644 keyboards/pegasus/keymaps/vial/rules.mk
delete mode 100644 keyboards/pegasus/keymaps/vial/vial.json
diff --git a/keyboards/pegasus/keymaps/vial/config.h b/keyboards/pegasus/keymaps/vial/config.h
deleted file mode 100644
index afdcecffdb6d..000000000000
--- a/keyboards/pegasus/keymaps/vial/config.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-
-#pragma once
-
-#define VIAL_KEYBOARD_UID {0x66, 0x38, 0xEC, 0xC0, 0x2F, 0xFC, 0x37, 0xBE}
diff --git a/keyboards/pegasus/keymaps/vial/keymap.c b/keyboards/pegasus/keymaps/vial/keymap.c
deleted file mode 100644
index 07768491d65b..000000000000
--- a/keyboards/pegasus/keymaps/vial/keymap.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright 2020 melonbred
- *
- * 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
-
-// Defines names for use in layer keycodes and the keymap
-enum layer_names {
- _BASE,
- _LAYER1,
- _LAYER2,
- _LAYER3
-
-};
-
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BASE] = LAYOUT_default(
- KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- MO(_LAYER2), KC_LALT, LT(_LAYER1, KC_SPC), KC_RALT, KC_RGUI
- ),
-
- [_LAYER1] = LAYOUT_default(
- KC_GRV, KC_QUOT, _______, KC_UP, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_DEL,
- KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PSLS, KC_PMNS, KC_4, KC_5, KC_6, KC_ENT,
- KC_LSFT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_PAST, KC_PPLS, KC_1, KC_2, KC_3, KC_RSFT,
- _______, _______, _______, KC_0, KC_PDOT
- ),
-
- [_LAYER2] = LAYOUT_default(
- KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, KC_RALT, KC_RCTL, KC_DEL, KC_VOLD,
- _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY
- ),
-
- [_LAYER3] = LAYOUT_default(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______
- ),
-};
-
-
-
-
-
diff --git a/keyboards/pegasus/keymaps/vial/rules.mk b/keyboards/pegasus/keymaps/vial/rules.mk
deleted file mode 100644
index 8c0cda1b2a2d..000000000000
--- a/keyboards/pegasus/keymaps/vial/rules.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-VIA_ENABLE = yes
-VIAL_ENABLE = yes
-VIAL_INSECURE = yes
-VIAL_ENCODERS_ENABLE = yes
diff --git a/keyboards/pegasus/keymaps/vial/vial.json b/keyboards/pegasus/keymaps/vial/vial.json
deleted file mode 100644
index baed9d0cdeb1..000000000000
--- a/keyboards/pegasus/keymaps/vial/vial.json
+++ /dev/null
@@ -1,115 +0,0 @@
-{
- "name": "MelonBred Pegasus",
- "vendorId": "0x6d62",
- "productId": "0x6d62",
- "lighting": "none",
- "matrix": { "rows": 4, "cols": 12 },
- "layouts": {
- "labels": [
- ["Spacebar Options", "6.25", "2/2.25"]
- ],
- "keymap": [
- [
- "0,0",
- "0,1",
- "0,2",
- "0,3",
- "0,4",
- "0,5",
- "0,6",
- "0,7",
- "0,8",
- "0,9",
- "0,10",
- {
- "w": 1.75
- },
- "0,11"
- ],
- [
- {
- "x": 2.5,
- "w": 1.25
- },
- "1,0",
- "1,1",
- "1,2",
- "1,3",
- "1,4",
- "1,5",
- "1,6",
- "1,7",
- "1,8",
- "1,9",
- "1,10",
- {
- "w": 1.5
- },
- "1,11"
- ],
- [
- {
- "x": 2.5,
- "w": 1.75
- },
- "2,0",
- "2,1",
- "2,2",
- "2,3",
- "2,4",
- "2,5",
- "2,6",
- "2,7",
- "2,8",
- "2,9",
- "2,10",
- "2,11",
- {
- "x": 0.5
- },
- "1,0\n\n\n\n\n\n\n\n\ne",
- "1,1\n\n\n\n\n\n\n\n\ne"
- ],
- [
- {
- "x": 2.5,
- "w": 1.25
- },
- "3,0",
- {
- "x": 0.75,
- "w": 1.25
- },
- "3,1",
- {
- "w": 6.25
- },
- "3,6\n\n\n3,0",
- {
- "w": 1.25
- },
- "3,9",
- {
- "x": 0.75,
- "w": 1.25
- },
- "3,11"
- ],
- [
- {
- "x": 5.75
- },
- "3,2\n\n\n3,1",
- {
- "w": 2
- },
- "3,4\n\n\n3,1",
- {
- "w": 2.25
- },
- "3,6\n\n\n3,1",
- "3,8\n\n\n3,1"
- ]
- ]
- }
-}
diff --git a/keyboards/pegasus/rules.mk b/keyboards/pegasus/rules.mk
index 8c5391661f92..ebf353b957b7 100644
--- a/keyboards/pegasus/rules.mk
+++ b/keyboards/pegasus/rules.mk
@@ -1,6 +1,9 @@
# MCU name
MCU = atmega32u4
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
# Build Options
# comment out to disable the options.
#
@@ -17,7 +20,3 @@ BACKLIGHT_ENABLE = no
RGBLIGHT_ENABLE = no
WS2812_DRIVER = no
ENCODER_ENABLE = yes
-
-
-
-
From b31dc505984f5c4ed330076f17793ae8cb46b554 Mon Sep 17 00:00:00 2001
From: melonbred <61572569+melonbred@users.noreply.github.com>
Date: Wed, 23 Mar 2022 01:25:02 -0700
Subject: [PATCH 6/9] Apply suggestions from code review
Co-authored-by: Drashna Jaelre
---
keyboards/pegasus/keymaps/default/keymap.c | 21 --------------------
keyboards/pegasus/keymaps/split/keymap.c | 23 ----------------------
keyboards/pegasus/pegasus.c | 20 +++++++++++++++++++
keyboards/pegasus/rules.mk | 16 +++++++--------
4 files changed, 27 insertions(+), 53 deletions(-)
diff --git a/keyboards/pegasus/keymaps/default/keymap.c b/keyboards/pegasus/keymaps/default/keymap.c
index a0bc33c6386a..fb2cb061fff8 100644
--- a/keyboards/pegasus/keymaps/default/keymap.c
+++ b/keyboards/pegasus/keymaps/default/keymap.c
@@ -48,24 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* Encoder Definitions */
-bool encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- else if (index == 1) {
- if (clockwise) {
- tap_code(KC_PGDN);
- } else {
- tap_code(KC_PGUP);
- }
- }
- return false;
-}
-
-
-
diff --git a/keyboards/pegasus/keymaps/split/keymap.c b/keyboards/pegasus/keymaps/split/keymap.c
index 58d4bb6fd208..964cfa2df757 100644
--- a/keyboards/pegasus/keymaps/split/keymap.c
+++ b/keyboards/pegasus/keymaps/split/keymap.c
@@ -47,26 +47,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-
-
-/* Encoder Definitions */
-bool encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- else if (index == 1) {
- if (clockwise) {
- tap_code(KC_PGDN);
- } else {
- tap_code(KC_PGUP);
- }
- }
- return false;
-}
-
-
-
diff --git a/keyboards/pegasus/pegasus.c b/keyboards/pegasus/pegasus.c
index 1d08935a35f4..0800a36f9e9d 100644
--- a/keyboards/pegasus/pegasus.c
+++ b/keyboards/pegasus/pegasus.c
@@ -15,3 +15,23 @@
*/
#include "pegasus.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(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ } else if (index == 1) {
+ if (clockwise) {
+ tap_code(KC_PGDN);
+ } else {
+ tap_code(KC_PGUP);
+ }
+ }
+ return true;
+}
+#endif
diff --git a/keyboards/pegasus/rules.mk b/keyboards/pegasus/rules.mk
index ebf353b957b7..83d423a0ec0c 100644
--- a/keyboards/pegasus/rules.mk
+++ b/keyboards/pegasus/rules.mk
@@ -8,15 +8,13 @@ BOOTLOADER = atmel-dfu
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-NKRO_ENABLE = yes # USB Nkey Rollover
-CUSTOM_MATRIX = no # Custom matrix file
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no
RGBLIGHT_ENABLE = no
-WS2812_DRIVER = no
ENCODER_ENABLE = yes
From abaaf2febd4050cd803a87664690b34eec2674e2 Mon Sep 17 00:00:00 2001
From: melonbred <61572569+melonbred@users.noreply.github.com>
Date: Wed, 23 Mar 2022 01:25:46 -0700
Subject: [PATCH 7/9] Update readme.md
---
keyboards/pegasus/readme.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/keyboards/pegasus/readme.md b/keyboards/pegasus/readme.md
index d46c07a013a5..b7a28ab8ef83 100644
--- a/keyboards/pegasus/readme.md
+++ b/keyboards/pegasus/readme.md
@@ -13,3 +13,11 @@ Make example for this keyboard (after setting up your build environment):
make pegasus: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
+
+Enter the bootloader in 3 ways:
+
+* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
+* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
+* **Keycode in layout**: Press the key mapped to `RESET` if it is available
From 2ae12e14220038b9d9cde8c3efea06e8a6514a91 Mon Sep 17 00:00:00 2001
From: melonbred <61572569+melonbred@users.noreply.github.com>
Date: Wed, 23 Mar 2022 21:57:26 -0700
Subject: [PATCH 8/9] Update keyboards/pegasus/readme.md
Co-authored-by: Ryan
---
keyboards/pegasus/readme.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/pegasus/readme.md b/keyboards/pegasus/readme.md
index b7a28ab8ef83..d164ba47aca6 100644
--- a/keyboards/pegasus/readme.md
+++ b/keyboards/pegasus/readme.md
@@ -1,6 +1,6 @@
# Pegasus
-![pegasus](https://i.imgur.com/6MKJN7w.jpg)
+![pegasus](https://i.imgur.com/6MKJN7wh.jpg)
Pegasus is a 40% keyboard with a 12.75u "WKL" layout with 0.75u blockers.
From ddfb064ad6d87f6886d5d81b54e9f639f46fca2e Mon Sep 17 00:00:00 2001
From: melonbred <61572569+melonbred@users.noreply.github.com>
Date: Sat, 26 Mar 2022 09:34:13 -0700
Subject: [PATCH 9/9] Update keyboards/pegasus/rules.mk
Co-authored-by: Ryan
---
keyboards/pegasus/rules.mk | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/keyboards/pegasus/rules.mk b/keyboards/pegasus/rules.mk
index 83d423a0ec0c..50b46dc95873 100644
--- a/keyboards/pegasus/rules.mk
+++ b/keyboards/pegasus/rules.mk
@@ -5,16 +5,15 @@ MCU = atmega32u4
BOOTLOADER = atmel-dfu
# Build Options
-# comment out to disable the options.
+# change yes to no to disable
#
-
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no
-RGBLIGHT_ENABLE = no
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes