From 5fec705d1f5617d535b62fb9b7ca08f30eb55dec Mon Sep 17 00:00:00 2001 From: C4illin Date: Sat, 21 Jan 2023 22:46:32 +0100 Subject: [PATCH 1/9] Added via keymap --- keyboards/bpiphany/pegasushoof/2015/config.h | 7 +++ keyboards/bpiphany/pegasushoof/2015/info.json | 8 ++- .../bpiphany/pegasushoof/keymaps/via/config.h | 18 ++++++ .../bpiphany/pegasushoof/keymaps/via/keymap.c | 55 +++++++++++++++++++ .../bpiphany/pegasushoof/keymaps/via/rules.mk | 17 ++++++ 5 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 keyboards/bpiphany/pegasushoof/keymaps/via/config.h create mode 100644 keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c create mode 100644 keyboards/bpiphany/pegasushoof/keymaps/via/rules.mk diff --git a/keyboards/bpiphany/pegasushoof/2015/config.h b/keyboards/bpiphany/pegasushoof/2015/config.h index d1d52d309809..7ae38815a909 100644 --- a/keyboards/bpiphany/pegasushoof/2015/config.h +++ b/keyboards/bpiphany/pegasushoof/2015/config.h @@ -17,6 +17,13 @@ along with this program. If not, see . #pragma once +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4245 // "BE" (Bathroom Epiphanies) +#define PRODUCT_ID 0x6050 // "`p" +#define DEVICE_VER 1.0 +#define MANUFACTURER "Filco" +#define PRODUCT "Majestouch TKL The Pegasus Hoof 2015" + /* key matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 18 diff --git a/keyboards/bpiphany/pegasushoof/2015/info.json b/keyboards/bpiphany/pegasushoof/2015/info.json index 9293a72bcb18..d3c6da04b0bd 100644 --- a/keyboards/bpiphany/pegasushoof/2015/info.json +++ b/keyboards/bpiphany/pegasushoof/2015/info.json @@ -1,5 +1,11 @@ { - "keyboard_name": "Majestouch TKL \\\\w The Pegasus Hoof 2015", + "keyboard_name": "Majestouch TKL The Pegasus Hoof 2015", + "manufacturer": "Filco", + "usb": { + "vid": "0x4245", + "pid": "0x6050", + "device_version": "1.0.0" + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/bpiphany/pegasushoof/keymaps/via/config.h b/keyboards/bpiphany/pegasushoof/keymaps/via/config.h new file mode 100644 index 000000000000..6e8bb6f4dc2e --- /dev/null +++ b/keyboards/bpiphany/pegasushoof/keymaps/via/config.h @@ -0,0 +1,18 @@ +/* Copyright 2023 Emrik Östling + * + * 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 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c new file mode 100644 index 000000000000..5af630a8630b --- /dev/null +++ b/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c @@ -0,0 +1,55 @@ +/* Copyright 2016 Daniel Svensson + * + * 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 + +#define KM_QWERTY 0 +#define KM_MEDIA 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Standard ISO layer */ + [KM_QWERTY] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Layer 1: Function layer */ + [KM_MEDIA] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WAKE, KC_PWR, KC_SLEP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, QK_BOOT, _______, KC_MPRV, KC_MSTP, KC_MNXT + ) +}; + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + ph_caps_led_on(); + } else { + ph_caps_led_off(); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + ph_sclk_led_on(); + } else { + ph_sclk_led_off(); + } +} + diff --git a/keyboards/bpiphany/pegasushoof/keymaps/via/rules.mk b/keyboards/bpiphany/pegasushoof/keymaps/via/rules.mk new file mode 100644 index 000000000000..93b563df393d --- /dev/null +++ b/keyboards/bpiphany/pegasushoof/keymaps/via/rules.mk @@ -0,0 +1,17 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +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 +CUSTOM_MATRIX = yes # Custom matrix file for the Pegasus Hoof due to the 2x74HC42 +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Keyboard backlight functionality +AUDIO_ENABLE = no # Audio output +RGBLIGHT_ENABLE = no # RGB underlight. + +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file From 74a27c07b15c561a7f5d71d31369a97b20fe07c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emrik=20=C3=96stling?= Date: Sat, 21 Jan 2023 23:26:02 +0100 Subject: [PATCH 2/9] Update keyboards/bpiphany/pegasushoof/2015/config.h Removed device info from config.h Co-authored-by: Joel Challis --- keyboards/bpiphany/pegasushoof/2015/config.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/keyboards/bpiphany/pegasushoof/2015/config.h b/keyboards/bpiphany/pegasushoof/2015/config.h index 7ae38815a909..d1d52d309809 100644 --- a/keyboards/bpiphany/pegasushoof/2015/config.h +++ b/keyboards/bpiphany/pegasushoof/2015/config.h @@ -17,13 +17,6 @@ along with this program. If not, see . #pragma once -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4245 // "BE" (Bathroom Epiphanies) -#define PRODUCT_ID 0x6050 // "`p" -#define DEVICE_VER 1.0 -#define MANUFACTURER "Filco" -#define PRODUCT "Majestouch TKL The Pegasus Hoof 2015" - /* key matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 18 From 5ce028a6bbf129e1f6a2e2370719bf04f3a9ef50 Mon Sep 17 00:00:00 2001 From: C4illin Date: Sat, 21 Jan 2023 23:28:46 +0100 Subject: [PATCH 3/9] updated rules.mk --- keyboards/bpiphany/pegasushoof/keymaps/via/rules.mk | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/keyboards/bpiphany/pegasushoof/keymaps/via/rules.mk b/keyboards/bpiphany/pegasushoof/keymaps/via/rules.mk index 93b563df393d..137260ef203b 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/via/rules.mk +++ b/keyboards/bpiphany/pegasushoof/keymaps/via/rules.mk @@ -2,16 +2,8 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -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 -CUSTOM_MATRIX = yes # Custom matrix file for the Pegasus Hoof due to the 2x74HC42 -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Keyboard backlight functionality -AUDIO_ENABLE = no # Audio output -RGBLIGHT_ENABLE = no # RGB underlight. - VIA_ENABLE = yes -LTO_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes From ad3ad5e6198e5b0a8458b5c394510966f296e4e2 Mon Sep 17 00:00:00 2001 From: C4illin Date: Sat, 21 Jan 2023 23:32:12 +0100 Subject: [PATCH 4/9] update root info.json --- keyboards/bpiphany/pegasushoof/info.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/bpiphany/pegasushoof/info.json b/keyboards/bpiphany/pegasushoof/info.json index 102304092a41..e2dfb5642b5d 100644 --- a/keyboards/bpiphany/pegasushoof/info.json +++ b/keyboards/bpiphany/pegasushoof/info.json @@ -1,10 +1,10 @@ { - "manufacturer": "Filco", - "url": "", - "maintainer": "qmk", - "usb": { - "vid": "0xFEED", - "pid": "0x6050", - "device_version": "1.0.4" - } + "manufacturer": "Filco", + "url": "", + "maintainer": "qmk", + "usb": { + "vid": "0x4245", + "pid": "0x6050", + "device_version": "1.0.0" + } } From 98ce31b6ffaffdc4332303bbd63165f4d660d0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emrik=20=C3=96stling?= Date: Mon, 23 Jan 2023 13:03:33 +0100 Subject: [PATCH 5/9] Update keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre --- .../bpiphany/pegasushoof/keymaps/via/keymap.c | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c index 5af630a8630b..2fad00515f95 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c +++ b/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c @@ -39,17 +39,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - ph_caps_led_on(); - } else { - ph_caps_led_off(); - } +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { + ph_caps_led_on(); + } else { + ph_caps_led_off(); + } - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - ph_sclk_led_on(); - } else { - ph_sclk_led_off(); - } + if (led_state.scroll_lock) { + ph_sclk_led_on(); + } else { + ph_sclk_led_off(); + } + return false; } From 38bc08304eadc1dbc4dd518a07fea09286b34ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emrik=20=C3=96stling?= Date: Mon, 23 Jan 2023 13:03:42 +0100 Subject: [PATCH 6/9] Update keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre --- keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c index 2fad00515f95..64c817fed564 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c +++ b/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c @@ -15,8 +15,10 @@ */ #include QMK_KEYBOARD_H -#define KM_QWERTY 0 -#define KM_MEDIA 1 +enum custom_layers { + KM_QWERTY, + M_MEDIA, +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Standard ISO layer */ From 3dcc1817daf5ced3fcbbe12e6e9d0e648f59b9ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emrik=20=C3=96stling?= Date: Tue, 24 Jan 2023 12:29:05 +0100 Subject: [PATCH 7/9] Update keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre --- keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c index 64c817fed564..676468d5c14b 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c +++ b/keyboards/bpiphany/pegasushoof/keymaps/via/keymap.c @@ -17,7 +17,7 @@ enum custom_layers { KM_QWERTY, - M_MEDIA, + KM_MEDIA, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { From 3d32db572a02739915be69e7b2f141b4942cec24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emrik=20=C3=96stling?= Date: Thu, 26 Jan 2023 09:57:48 +0100 Subject: [PATCH 8/9] Update keyboards/bpiphany/pegasushoof/2015/info.json Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/bpiphany/pegasushoof/2015/info.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/keyboards/bpiphany/pegasushoof/2015/info.json b/keyboards/bpiphany/pegasushoof/2015/info.json index d3c6da04b0bd..7c71a6322dc4 100644 --- a/keyboards/bpiphany/pegasushoof/2015/info.json +++ b/keyboards/bpiphany/pegasushoof/2015/info.json @@ -1,11 +1,5 @@ { "keyboard_name": "Majestouch TKL The Pegasus Hoof 2015", - "manufacturer": "Filco", - "usb": { - "vid": "0x4245", - "pid": "0x6050", - "device_version": "1.0.0" - }, "layouts": { "LAYOUT": { "layout": [ From 2b851157212d1a10675c25fb998b2f6777c4ab73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emrik=20=C3=96stling?= Date: Tue, 31 Jan 2023 11:28:08 +0100 Subject: [PATCH 9/9] Update keyboards/bpiphany/pegasushoof/keymaps/via/config.h Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/bpiphany/pegasushoof/keymaps/via/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/bpiphany/pegasushoof/keymaps/via/config.h b/keyboards/bpiphany/pegasushoof/keymaps/via/config.h index 6e8bb6f4dc2e..efa757f3c56b 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/via/config.h +++ b/keyboards/bpiphany/pegasushoof/keymaps/via/config.h @@ -15,4 +15,4 @@ */ #pragma once -#define DYNAMIC_KEYMAP_LAYER_COUNT 3 +#define DYNAMIC_KEYMAP_LAYER_COUNT 2