aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/mechanicalkeyboards/point65/hotswap/hotswap.c
diff options
context:
space:
mode:
authorSebastiaan Swinkels2026-02-10 09:20:34 +0100
committerGitHub2026-02-10 09:20:34 +0100
commita7f524f2645fff8524922d52f5e9691694395599 (patch)
tree707e267168c204c02c5c477b46a0c9caf0f034d4 /keyboards/mechanicalkeyboards/point65/hotswap/hotswap.c
parent8a6c081c4acbd0993df7019053c2360370f842f2 (diff)
Added MK Point65 keyboards and keymaps (#25392)
Diffstat (limited to 'keyboards/mechanicalkeyboards/point65/hotswap/hotswap.c')
-rw-r--r--keyboards/mechanicalkeyboards/point65/hotswap/hotswap.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/keyboards/mechanicalkeyboards/point65/hotswap/hotswap.c b/keyboards/mechanicalkeyboards/point65/hotswap/hotswap.c
new file mode 100644
index 0000000000..1da89f6f2d
--- /dev/null
+++ b/keyboards/mechanicalkeyboards/point65/hotswap/hotswap.c
@@ -0,0 +1,62 @@
+/* Copyright 2024 Sebastiaan Swinkels @ BeanBoards <sebastiaan.swinkels@googlemail.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 "quantum.h"
+
+ enum point65_layers {
+ _QWERTY,
+ _FUNCTION
+};
+
+bool rgb_matrix_indicators_kb(void) {
+ if (!rgb_matrix_indicators_user()){
+ return false;
+ }
+
+ hsv_t hsv = {0, 255, 255};
+
+ // Light up ESC RGB LED when _FUNCTION layer is accessed
+ if ((get_highest_layer(layer_state|default_layer_state)) == _FUNCTION){
+ hsv.h = 43;
+ hsv.s = 105;
+ hsv.v = 255;
+
+ if (hsv.v > rgb_matrix_get_val() + RGB_INDICATOR_POS_OFFSET) {
+ hsv.v = rgb_matrix_get_val() + RGB_INDICATOR_POS_OFFSET;
+ }
+ rgb_t rgb = hsv_to_rgb(hsv);
+
+ rgb_matrix_set_color(0, rgb.r, rgb.g, rgb.b);
+ }
+ // end layer function
+
+ // capslock indicator
+ if (host_keyboard_led_state().caps_lock) {
+ hsv.h = 43;
+ hsv.s = 105;
+ hsv.v = 255;
+
+ if (hsv.v > rgb_matrix_get_val() + RGB_INDICATOR_POS_OFFSET) {
+ hsv.v = rgb_matrix_get_val() + RGB_INDICATOR_POS_OFFSET;
+ }
+ rgb_t rgb = hsv_to_rgb(hsv);
+
+ rgb_matrix_set_color(1, rgb.r, rgb.g, rgb.b);
+ }
+ // end capslock function
+
+ return false;
+}