summaryrefslogtreecommitdiff
path: root/keyboards/massdrop/ctrl/keymaps/xanimos/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/massdrop/ctrl/keymaps/xanimos/keymap.c')
-rw-r--r--keyboards/massdrop/ctrl/keymaps/xanimos/keymap.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/keyboards/massdrop/ctrl/keymaps/xanimos/keymap.c b/keyboards/massdrop/ctrl/keymaps/xanimos/keymap.c
index c7bc285eda..8fd0002b45 100644
--- a/keyboards/massdrop/ctrl/keymaps/xanimos/keymap.c
+++ b/keyboards/massdrop/ctrl/keymaps/xanimos/keymap.c
@@ -1,18 +1,18 @@
/* Copyright 2022 Daniel Weeks (@xanimos)
- *
- * 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/>.
- */
+ *
+ * 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 "keymap.h"
@@ -44,7 +44,7 @@ static const char * sendstring_commands[] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_KL] = LAYOUT(
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 PRINT SCLCK PAUSE
- 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_SLCK,RCS(KC_M),
+ 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,RCS(KC_M),
// ~ 1 2 3 4 5 6 7 8 9 0 - = BCKSP INS HOME PGUP
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,
// TAB Q W E R T Y U I O P [ ] \ DEL END PGDN
@@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// SHIFT Z X C V B N M , . / RSHIFT UP
KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSPC, KC_UP ,
// CTRL GUI ALT SPACE RALT MENU RGUI RCTRL LEFT DOWN RIGHT
- KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, TD(TD_FN_SWITCH), KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TD(TD_FN_SWITCH), KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[_FL] = LAYOUT(
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 PRINT SCLCK PAUSE
@@ -118,7 +118,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#define __OFF__ {0, 0, 0}
-const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = {
+const uint8_t PROGMEM ledmap[][RGB_MATRIX_LED_COUNT][3] = {
[_FL] = {
// These remain on base layer rgb to see adjustments ;)
// |----------------------------------|
@@ -274,7 +274,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// ======================================================== CUSTOM KEYCOADS BELOW ========================================================
case COPY_ALL:
// Selects all and text and copy
- SEND_STRING(SS_LCTRL("ac"));
+ SEND_STRING(SS_LCTL("ac"));
return false;
case ROUT_TG:
// Toggle idle LED timeout on or off
@@ -323,7 +323,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
void set_layer_color(int layer) {
if (layer == 0) { return; }
- for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
+ for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
HSV hsv = {
.h = pgm_read_byte(&ledmap[layer][i][0]),
.s = pgm_read_byte(&ledmap[layer][i][1]),
@@ -334,7 +334,7 @@ void set_layer_color(int layer) {
float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX;
rgb_matrix_set_color(i, f * rgb.r, f * rgb.g, f * rgb.b);
continue;
- }
+ }
if(layer == _FL && i <= 4 && i >= 1) {
continue; // Leave RGB for F1-F4 of function layer to adjust RGB settings
}
@@ -343,13 +343,14 @@ void set_layer_color(int layer) {
}
}
-void rgb_matrix_indicators_user(void) {
+bool rgb_matrix_indicators_user(void) {
if (disable_layer_color ||
rgb_matrix_get_flags() == LED_FLAG_NONE ||
rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) {
return;
}
set_layer_color(get_highest_layer(layer_state));
+ return false;
}