summaryrefslogtreecommitdiff
path: root/keyboards/gl516
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/gl516')
-rw-r--r--keyboards/gl516/j73gl/config.h4
-rw-r--r--keyboards/gl516/j73gl/info.json3
-rw-r--r--keyboards/gl516/j73gl/keymaps/via_rgb_matrix/rules.mk2
-rw-r--r--keyboards/gl516/n51gl/config.h4
-rw-r--r--keyboards/gl516/n51gl/info.json61
-rw-r--r--keyboards/gl516/n51gl/keymaps/salicylic/config.h22
-rw-r--r--keyboards/gl516/n51gl/keymaps/salicylic/keymap.c117
-rw-r--r--keyboards/gl516/n51gl/keymaps/via/keymap.c45
-rw-r--r--keyboards/gl516/n51gl/keymaps/via/rules.mk3
9 files changed, 29 insertions, 232 deletions
diff --git a/keyboards/gl516/j73gl/config.h b/keyboards/gl516/j73gl/config.h
index 49205e59d1..7adc4e10c3 100644
--- a/keyboards/gl516/j73gl/config.h
+++ b/keyboards/gl516/j73gl/config.h
@@ -31,10 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#ifndef RGBLED_NUM
- #define RGBLED_NUM 73
-#endif
-
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
diff --git a/keyboards/gl516/j73gl/info.json b/keyboards/gl516/j73gl/info.json
index a34c1e6c4c..2650356f1f 100644
--- a/keyboards/gl516/j73gl/info.json
+++ b/keyboards/gl516/j73gl/info.json
@@ -8,6 +8,9 @@
"pid": "0xE8D0",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "led_count": 73
+ },
"ws2812": {
"pin": "D3"
},
diff --git a/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/rules.mk b/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/rules.mk
index 294015d80b..d93c728213 100644
--- a/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/rules.mk
+++ b/keyboards/gl516/j73gl/keymaps/via_rgb_matrix/rules.mk
@@ -1,6 +1,6 @@
RGBLIGHT_ENABLE = no
RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = WS2812
+RGB_MATRIX_DRIVER = ws2812
VIA_ENABLE = yes
LTO_ENABLE = yes
SPACE_CADET_ENABLE = no
diff --git a/keyboards/gl516/n51gl/config.h b/keyboards/gl516/n51gl/config.h
index cd919a72c4..138e9d1063 100644
--- a/keyboards/gl516/n51gl/config.h
+++ b/keyboards/gl516/n51gl/config.h
@@ -31,10 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#ifndef RGBLED_NUM
- #define RGBLED_NUM 15
-#endif
-
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
diff --git a/keyboards/gl516/n51gl/info.json b/keyboards/gl516/n51gl/info.json
index 9da8930c60..180a2b4c75 100644
--- a/keyboards/gl516/n51gl/info.json
+++ b/keyboards/gl516/n51gl/info.json
@@ -8,6 +8,9 @@
"pid": "0xE8CF",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "led_count": 15
+ },
"ws2812": {
"pin": "D3"
},
@@ -83,64 +86,6 @@
{"matrix": [7, 5], "x": 14.75, "y": 3},
{"matrix": [7, 6], "x": 15.75, "y": 3}
]
- },
- "LAYOUT_rotary_layer": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0},
- {"matrix": [0, 1], "x": 1, "y": 0},
- {"matrix": [0, 2], "x": 2, "y": 0},
- {"matrix": [0, 3], "x": 3, "y": 0},
- {"matrix": [0, 4], "x": 4, "y": 0},
- {"matrix": [0, 5], "x": 5, "y": 0},
- {"matrix": [0, 6], "x": 6, "y": 0},
- {"matrix": [4, 0], "x": 7, "y": 0},
- {"matrix": [4, 1], "x": 8, "y": 0},
- {"matrix": [4, 2], "x": 9, "y": 0},
- {"matrix": [4, 3], "x": 10, "y": 0},
- {"matrix": [4, 4], "x": 11, "y": 0},
- {"matrix": [4, 5], "x": 12, "y": 0},
- {"matrix": [4, 6], "x": 13, "y": 0},
- {"matrix": [1, 1], "x": 14, "y": 0},
- {"matrix": [1, 2], "x": 15, "y": 0},
- {"matrix": [1, 3], "x": 16, "y": 0},
- {"matrix": [1, 4], "x": 17, "y": 0},
- {"matrix": [1, 5], "x": 18, "y": 0},
- {"matrix": [1, 6], "x": 19, "y": 0},
- {"matrix": [1, 0], "x": 20, "y": 0},
- {"matrix": [5, 0], "x": 21, "y": 0},
- {"matrix": [5, 1], "x": 22, "y": 0},
- {"matrix": [5, 2], "x": 23, "y": 0},
- {"matrix": [5, 3], "x": 24, "y": 0},
- {"matrix": [5, 4], "x": 25, "y": 0},
- {"matrix": [5, 5], "x": 26, "y": 0},
- {"matrix": [5, 6], "x": 27, "y": 0},
- {"matrix": [2, 1], "x": 28, "y": 0},
- {"matrix": [2, 2], "x": 29, "y": 0},
- {"matrix": [2, 3], "x": 30, "y": 0},
- {"matrix": [2, 4], "x": 31, "y": 0},
- {"matrix": [2, 5], "x": 32, "y": 0},
- {"matrix": [2, 6], "x": 33, "y": 0},
- {"matrix": [2, 0], "x": 34, "y": 0},
- {"matrix": [6, 0], "x": 35, "y": 0},
- {"matrix": [6, 1], "x": 36, "y": 0},
- {"matrix": [6, 2], "x": 37, "y": 0},
- {"matrix": [6, 3], "x": 38, "y": 0},
- {"matrix": [6, 4], "x": 39, "y": 0},
- {"matrix": [6, 5], "x": 40, "y": 0},
- {"matrix": [6, 6], "x": 41, "y": 0},
- {"matrix": [3, 1], "x": 42, "y": 0},
- {"matrix": [3, 2], "x": 43, "y": 0},
- {"matrix": [3, 4], "x": 44, "y": 0},
- {"matrix": [3, 5], "x": 45, "y": 0},
- {"matrix": [3, 6], "x": 46, "y": 0},
- {"matrix": [3, 0], "x": 47, "y": 0},
- {"matrix": [7, 0], "x": 48, "y": 0},
- {"matrix": [7, 1], "x": 49, "y": 0},
- {"matrix": [7, 2], "x": 50, "y": 0},
- {"matrix": [7, 4], "x": 51, "y": 0},
- {"matrix": [7, 5], "x": 52, "y": 0},
- {"matrix": [7, 6], "x": 53, "y": 0}
- ]
}
}
}
diff --git a/keyboards/gl516/n51gl/keymaps/salicylic/config.h b/keyboards/gl516/n51gl/keymaps/salicylic/config.h
deleted file mode 100644
index 0e221d844d..0000000000
--- a/keyboards/gl516/n51gl/keymaps/salicylic/config.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright 2021 Salicylic_acid3
- *
- * 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/>.
- */
-
-#pragma once
-
-/* Select hand configuration */
-
-#define QUICK_TAP_TERM 0
-#define TAPPING_TERM 180
diff --git a/keyboards/gl516/n51gl/keymaps/salicylic/keymap.c b/keyboards/gl516/n51gl/keymaps/salicylic/keymap.c
deleted file mode 100644
index 81f7b8665f..0000000000
--- a/keyboards/gl516/n51gl/keymaps/salicylic/keymap.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-Copyright 2021 Salicylic_Acid
-
-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 QMK_KEYBOARD_H
-#include "keymap_japanese.h"
-
-
-// Each layer gets a name for readability, which is then used in the keymap matrix below.
-// The underscores don't mean anything - you can have a layer called STUFF or any other name.
-// Layer names don't all need to be of the same length, obviously, and you can also skip them
-// entirely and just use numbers.
-enum layer_number {
- _QWERTY = 0,
- _LOWER,
- _RAISE,
- _ADJUST,
-};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_rotary_layer(
- //,--------------------------------------------------------------| |--------------------------------------------------------------.
- KC_ESC, 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_BSPC,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_VOLU, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_BSLS, KC_ENT,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_N, KC_M, KC_COMM, KC_DOT, JP_SLSH, KC_UP, KC_RSFT,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- JP_ZKHK, KC_LALT,LGUI_T(JP_MHEN),LT(_LOWER,KC_ENT),KC_BSPC, KC_VOLD, KC_DEL,LT(_RAISE,KC_SPC),ALT_T(JP_HENK),KC_LEFT, KC_DOWN, KC_RGHT
- //|--------------------------------------------------------------| |--------------------------------------------------------------'
- ),
- [_LOWER] = LAYOUT_rotary_layer(
- //,--------------------------------------------------------------| |--------------------------------------------------------------.
- _______, _______, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, KC_BSPC,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, KC_WH_U, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, _______,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_BTN3, KC_0, KC_1, KC_2, KC_3, JP_PLUS, _______, _______,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- _______, _______, JP_MHEN, MO(_LOWER), _______, KC_WH_D, _______, MO(_RAISE), JP_DOT, _______, _______, _______
- //|--------------------------------------------------------------| |--------------------------------------------------------------'
- ),
-
- [_RAISE] = LAYOUT_rotary_layer(
- //,--------------------------------------------------------------| |--------------------------------------------------------------.
- _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP,LALT(KC_PSCR),KC_PSCR,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WH_L, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, _______,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, _______, _______,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______, KC_WH_R, _______, _______, JP_HENK, _______, _______, _______
- //|--------------------------------------------------------------| |--------------------------------------------------------------'
- ),
-
- [_ADJUST] = LAYOUT_rotary_layer(
- //,--------------------------------------------------------------| |--------------------------------------------------------------.
- QK_BOOT, KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,LALT(KC_PSCR),KC_PSCR,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_TOG, RGB_MOD, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, _______,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- SFT_T(KC_F12), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, XXXXXXX, _______, _______,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______,RGB_RMOD, _______, _______, _______, _______, _______, _______
- //|--------------------------------------------------------------| |--------------------------------------------------------------'
- )
-};
-
-//A description for expressing the layer position in LED mode.
-layer_state_t layer_state_set_user(layer_state_t state) {
- state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
-#ifdef RGBLIGHT_ENABLE
- switch (get_highest_layer(state)) {
- case _LOWER:
- rgblight_sethsv_at(HSV_BLUE, 0);
- break;
- case _RAISE:
- rgblight_sethsv_at(HSV_RED, 0);
- break;
- case _ADJUST:
- rgblight_sethsv_at(HSV_PURPLE, 0);
- break;
- default: // for any other layers, or the default layer
- rgblight_sethsv_at( 0, 0, 0, 0);
- break;
- }
- rgblight_set_effect_range( 1, 14);
-#endif
-return state;
-}
-
-bool encoder_update_user(uint8_t index, bool clockwise) {
- keypos_t key;
- if (clockwise) {
- key.row = 3;
- key.col = 0;
- } else {
- key.row = 1;
- key.col = 0;
- }
- action_exec(MAKE_KEYEVENT(key.row, key.col, true));
- action_exec(MAKE_KEYEVENT(key.row, key.col, false));
- return true;
-}
diff --git a/keyboards/gl516/n51gl/keymaps/via/keymap.c b/keyboards/gl516/n51gl/keymaps/via/keymap.c
index cf1aa7d595..10980c6ad0 100644
--- a/keyboards/gl516/n51gl/keymaps/via/keymap.c
+++ b/keyboards/gl516/n51gl/keymaps/via/keymap.c
@@ -18,48 +18,48 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_rotary_layer(
+ [0] = LAYOUT(
//,--------------------------------------------------------------| |--------------------------------------------------------------.
KC_ESC, 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_BSPC,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- LT(1,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_VOLU, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ LT(1,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_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_VOLD, KC_SPC, KC_SPC, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT
//|--------------------------------------------------------------| |--------------------------------------------------------------'
),
- [1] = LAYOUT_rotary_layer(
+ [1] = LAYOUT(
//,--------------------------------------------------------------| |--------------------------------------------------------------.
_______, QK_BOOT, 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_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______,
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
//|--------------------------------------------------------------| |--------------------------------------------------------------'
),
- [2] = LAYOUT_rotary_layer(
+ [2] = LAYOUT(
//,--------------------------------------------------------------| |--------------------------------------------------------------.
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
//|--------------------------------------------------------------| |--------------------------------------------------------------'
),
- [3] = LAYOUT_rotary_layer(
+ [3] = LAYOUT(
//,--------------------------------------------------------------| |--------------------------------------------------------------.
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
//|--------------------------------------------------------------| |--------------------------------------------------------------'
)
};
@@ -87,16 +87,11 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state;
}
-bool encoder_update_user(uint8_t index, bool clockwise) {
- keypos_t key;
- if (clockwise) {
- key.row = 3;
- key.col = 0;
- } else {
- key.row = 1;
- key.col = 0;
- }
- action_exec(MAKE_KEYEVENT(key.row, key.col, true));
- action_exec(MAKE_KEYEVENT(key.row, key.col, false));
- return true;
-}
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(_______, _______) },
+ [2] = { ENCODER_CCW_CW(_______, _______) },
+ [3] = { ENCODER_CCW_CW(_______, _______) },
+};
+#endif
diff --git a/keyboards/gl516/n51gl/keymaps/via/rules.mk b/keyboards/gl516/n51gl/keymaps/via/rules.mk
index 036bd6d1c3..f1adcab005 100644
--- a/keyboards/gl516/n51gl/keymaps/via/rules.mk
+++ b/keyboards/gl516/n51gl/keymaps/via/rules.mk
@@ -1 +1,2 @@
-VIA_ENABLE = yes \ No newline at end of file
+VIA_ENABLE = yes
+ENCODER_MAP_ENABLE = yes