From 7b798080dada8e00b1c8c898947d8f7b06289ea5 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 19 Jun 2024 09:24:47 -0500 Subject: [PATCH] Updating Ploopyco and linting - added license information from linter report out - Moved ploopy nano host state led control from keyboard level to user level --- .../charybdis/3x5/keymaps/t4corun/config.h | 15 ++++++ .../charybdis/3x5/keymaps/t4corun/keymap.c | 15 ++++++ .../bluebell/swoop/keymaps/t4corun/config.h | 15 ++++++ .../bluebell/swoop/keymaps/t4corun/keymap.c | 16 ++++++ keyboards/crkbd/keymaps/t4corun/config.h | 15 ++++++ keyboards/crkbd/keymaps/t4corun/keymap.c | 15 ++++++ .../trackball_nano/keymaps/t4corun/config.h | 15 ++++++ .../trackball_nano/keymaps/t4corun/keymap.c | 49 ++++++++++++++++++- 8 files changed, 154 insertions(+), 1 deletion(-) diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/t4corun/config.h b/keyboards/bastardkb/charybdis/3x5/keymaps/t4corun/config.h index c1f360ed..5485809a 100644 --- a/keyboards/bastardkb/charybdis/3x5/keymaps/t4corun/config.h +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/t4corun/config.h @@ -1,3 +1,18 @@ +/* +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 CHARYBDIS_CONFIG_SYNC diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/t4corun/keymap.c b/keyboards/bastardkb/charybdis/3x5/keymaps/t4corun/keymap.c index 6354ed87..3483db90 100644 --- a/keyboards/bastardkb/charybdis/3x5/keymaps/t4corun/keymap.c +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/t4corun/keymap.c @@ -1,3 +1,18 @@ +/* +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 "t4corun.h" #define LAYOUT_cnano_wrapper(...) LAYOUT_charybdis_3x5(__VA_ARGS__) diff --git a/keyboards/bluebell/swoop/keymaps/t4corun/config.h b/keyboards/bluebell/swoop/keymaps/t4corun/config.h index 787ab082..e6813ab9 100644 --- a/keyboards/bluebell/swoop/keymaps/t4corun/config.h +++ b/keyboards/bluebell/swoop/keymaps/t4corun/config.h @@ -1,3 +1,18 @@ +/* +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 . +*/ + //Having this makes the left side encoder act like the right side #undef EE_HANDS diff --git a/keyboards/bluebell/swoop/keymaps/t4corun/keymap.c b/keyboards/bluebell/swoop/keymaps/t4corun/keymap.c index bd1bd389..23a4f95f 100644 --- a/keyboards/bluebell/swoop/keymaps/t4corun/keymap.c +++ b/keyboards/bluebell/swoop/keymaps/t4corun/keymap.c @@ -1,3 +1,19 @@ +/* +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 "t4corun.h" #define LAYOUT_swoop_wrapper(...) LAYOUT_split_3x5_3(__VA_ARGS__) diff --git a/keyboards/crkbd/keymaps/t4corun/config.h b/keyboards/crkbd/keymaps/t4corun/config.h index 7b9637ef..c4fde037 100644 --- a/keyboards/crkbd/keymaps/t4corun/config.h +++ b/keyboards/crkbd/keymaps/t4corun/config.h @@ -1 +1,16 @@ +/* +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 \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/t4corun/keymap.c b/keyboards/crkbd/keymaps/t4corun/keymap.c index 097ce3ad..833281aa 100644 --- a/keyboards/crkbd/keymaps/t4corun/keymap.c +++ b/keyboards/crkbd/keymaps/t4corun/keymap.c @@ -1,3 +1,18 @@ +/* +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 "t4corun.h" #define LAYOUT_crkbd_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__) diff --git a/keyboards/ploopyco/trackball_nano/keymaps/t4corun/config.h b/keyboards/ploopyco/trackball_nano/keymaps/t4corun/config.h index 5ec3ee19..e6326191 100644 --- a/keyboards/ploopyco/trackball_nano/keymaps/t4corun/config.h +++ b/keyboards/ploopyco/trackball_nano/keymaps/t4corun/config.h @@ -1,3 +1,18 @@ +/* +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 PLOOPY_HOST_LED_CONTROL diff --git a/keyboards/ploopyco/trackball_nano/keymaps/t4corun/keymap.c b/keyboards/ploopyco/trackball_nano/keymaps/t4corun/keymap.c index fa577318..d90b6d48 100644 --- a/keyboards/ploopyco/trackball_nano/keymaps/t4corun/keymap.c +++ b/keyboards/ploopyco/trackball_nano/keymaps/t4corun/keymap.c @@ -1,3 +1,50 @@ +/* +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 "t4corun.h" -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {{{ KC_NO }}}; \ No newline at end of file +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {{{ KC_NO }}}; + +static bool num_lock_state = false; +static bool scroll_lock_state = false; + +void keyboard_post_init_user(void) { + + num_lock_state = host_keyboard_led_state().num_lock; + scroll_lock_state = host_keyboard_led_state().scroll_lock; + +} + +bool led_update_user(led_t led_state) { + + // when scroll lock is pressed, toggle drag scroll state + if ( scroll_lock_state != led_state.scroll_lock ) { + toggle_drag_scroll(); + scroll_lock_state = led_state.scroll_lock; + } + + // when num lock is pressed, cycle dpi + if ( num_lock_state != led_state.num_lock ) { + cycle_dpi(); + num_lock_state = led_state.num_lock; + } + + // when all three are enabled, go to bootloader + if ( led_state.num_lock && led_state.caps_lock && led_state.scroll_lock ) { + reset_keyboard(); + } + + return true; +} \ No newline at end of file