Layout name changed in all the keymap files according to the keyboard.json file and also formatted the C code in rev1.c file as requested by QMK Maintainer in Pull Request.

This commit is contained in:
atechofficials 2024-06-27 14:17:29 +05:30
parent 4c18c8885b
commit f38ca58467
4 changed files with 12 additions and 17 deletions

View File

@ -28,14 +28,14 @@ enum protokeeb_keymap_layers {
#define LOWER LT(LAYER_LOWER, KC_KP_0)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_BASE] = LAYOUT_custom_matrix( /* Base */
[LAYER_BASE] = LAYOUT( /* Base */
KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, KC_MUTE,
KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK,
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_MINUS,
LOWER, KC_KP_DOT, KC_KP_ENTER, KC_KP_PLUS
),
[LAYER_LOWER] = LAYOUT_custom_matrix( /* RGB Control */
[LAYER_LOWER] = LAYOUT( /* RGB Control */
RGB_MODE_PLAIN, RGB_MODE_FORWARD, RGB_MODE_REVERSE, RGB_TOG, KC_MUTE,
RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD,
RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD,

View File

@ -33,28 +33,28 @@ enum protokeeb_keymap_layers {
#define RGB_CTRL MO(LAYER_RGB_CONTROL)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_NOTES_SET_1] = LAYOUT_custom_matrix( /* Notes Set-1 */
[LAYER_NOTES_SET_1] = LAYOUT( /* Notes Set-1 */
MI_C, MI_Cs, MI_D, MI_Ds, KC_MUTE,
MI_E, MI_F, MI_Fs, MI_G,
MI_Gs, MI_A, MI_As, MI_B,
RGB_CTRL, NOTES_SET_2, NOTES_SET_3, MI_TOGG
),
[LAYER_NOTES_SET_2] = LAYOUT_custom_matrix( /* Notes Set-2 */
[LAYER_NOTES_SET_2] = LAYOUT( /* Notes Set-2 */
MI_C1, MI_Cs1, MI_D1, MI_Ds1, KC_MUTE,
MI_E1, MI_F1, MI_Fs1, MI_G1,
MI_Gs1, MI_A1, MI_As1, MI_B1,
NOTES_SET_1, KC_TRNS, NOTES_SET_3, KC_TRNS
),
[LAYER_NOTES_SET_3] = LAYOUT_custom_matrix( /* Notes Set-3 */
[LAYER_NOTES_SET_3] = LAYOUT( /* Notes Set-3 */
MI_C2, MI_Cs2, MI_D2, MI_Ds2, KC_MUTE,
MI_E2, MI_F2, MI_Fs2, MI_G2,
MI_Gs2, MI_A2, MI_As2, MI_B2,
NOTES_SET_1, NOTES_SET_2, KC_TRNS, KC_TRNS
),
[LAYER_RGB_CONTROL] = LAYOUT_custom_matrix( /* RGB Control */
[LAYER_RGB_CONTROL] = LAYOUT( /* RGB Control */
RGB_MODE_PLAIN, RGB_MODE_FORWARD, RGB_MODE_REVERSE, RGB_TOG, KC_MUTE,
RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD,
RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD,

View File

@ -28,14 +28,14 @@ enum protokeeb_keymap_layers {
#define LOWER LT(LAYER_LOWER, KC_KP_0)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_BASE] = LAYOUT_custom_matrix( /* Base */
[LAYER_BASE] = LAYOUT( /* Base */
KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, KC_MUTE,
KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK,
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_MINUS,
LOWER, KC_KP_DOT, KC_KP_ENTER, KC_KP_PLUS
),
[LAYER_LOWER] = LAYOUT_custom_matrix( /* RGB Control */
[LAYER_LOWER] = LAYOUT( /* RGB Control */
RGB_MODE_PLAIN, RGB_MODE_FORWARD, RGB_MODE_REVERSE, RGB_TOG, KC_MUTE,
RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD,
RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD,

View File

@ -17,16 +17,11 @@
#include "quantum.h"
// Override the matrix read function to include the encoder button
void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
{
if (current_row == ENCODER_BUTTON_ROW)
{
if (readPin(ENCODER_BUTTON_PIN) == 0)
{
void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
if (current_row == ENCODER_BUTTON_ROW) {
if (readPin(ENCODER_BUTTON_PIN) == 0) {
current_matrix[current_row] |= (1 << ENCODER_BUTTON_COL);
}
else
{
} else {
current_matrix[current_row] &= ~(1 << ENCODER_BUTTON_COL);
}
}