mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-12-10 13:36:10 +08:00
Fixup rgbkb/pan (#25678)
Tidy up rgbkb/pan - Migrate g_led_config to DD and fix coordinates - Remove RGBLight configuration - Migrate keymaps to JSON - Move keymap OLED code to keyboard level - Remove cutom layout selection logic (post_rules.mk) - Use short SPDX license headers
This commit is contained in:
@@ -1,20 +1,5 @@
|
||||
/*Copyright 2020 RGBKB
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
// Copyright 2020 RGBKB
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#define RGB_MATRIX_LED_COUNT 64
|
||||
#define WS2812_LED_COUNT 64
|
||||
|
||||
@@ -66,23 +66,71 @@
|
||||
"solid_splash": true,
|
||||
"solid_multisplash": true
|
||||
},
|
||||
"driver": "custom"
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 64,
|
||||
"max_brightness": 120,
|
||||
"animations": {
|
||||
"breathing": true,
|
||||
"rainbow_mood": true,
|
||||
"rainbow_swirl": true,
|
||||
"snake": true,
|
||||
"knight": true,
|
||||
"christmas": true,
|
||||
"static_gradient": true,
|
||||
"rgb_test": true,
|
||||
"alternating": true,
|
||||
"twinkle": true
|
||||
}
|
||||
"driver": "custom",
|
||||
"layout": [
|
||||
{"x": 0, "y": 0, "flags": 1},
|
||||
{"x": 224, "y": 0, "flags": 1},
|
||||
{"matrix": [0, 0], "x": 9, "y": 13, "flags": 1},
|
||||
{"matrix": [0, 1], "x": 28, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 2], "x": 47, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 3], "x": 66, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 4], "x": 84, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 5], "x": 104, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 6], "x": 123, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 7], "x": 142, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 8], "x": 161, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 9], "x": 180, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 10], "x": 199, "y": 13, "flags": 4},
|
||||
{"matrix": [0, 12], "x": 215, "y": 13, "flags": 1},
|
||||
{"matrix": [1, 11], "x": 215, "y": 26, "flags": 1},
|
||||
{"matrix": [1, 10], "x": 199, "y": 26, "flags": 4},
|
||||
{"matrix": [1, 9], "x": 180, "y": 26, "flags": 4},
|
||||
{"matrix": [1, 8], "x": 161, "y": 26, "flags": 4},
|
||||
{"matrix": [1, 7], "x": 142, "y": 26, "flags": 4},
|
||||
{"matrix": [1, 6], "x": 123, "y": 26, "flags": 4},
|
||||
{"matrix": [1, 5], "x": 104, "y": 26, "flags": 4},
|
||||
{"matrix": [1, 4], "x": 84, "y": 26, "flags": 4},
|
||||
{"matrix": [1, 3], "x": 66, "y": 26, "flags": 4},
|
||||
{"matrix": [1, 2], "x": 47, "y": 26, "flags": 4},
|
||||
{"matrix": [1, 1], "x": 28, "y": 26, "flags": 4},
|
||||
{"matrix": [1, 0], "x": 9, "y": 26, "flags": 1},
|
||||
{"matrix": [2, 0], "x": 9, "y": 38, "flags": 1},
|
||||
{"matrix": [2, 1], "x": 28, "y": 38, "flags": 4},
|
||||
{"matrix": [2, 2], "x": 47, "y": 38, "flags": 4},
|
||||
{"matrix": [2, 3], "x": 66, "y": 38, "flags": 4},
|
||||
{"matrix": [2, 4], "x": 84, "y": 38, "flags": 4},
|
||||
{"matrix": [2, 5], "x": 104, "y": 38, "flags": 4},
|
||||
{"matrix": [2, 6], "x": 123, "y": 38, "flags": 4},
|
||||
{"matrix": [2, 7], "x": 142, "y": 38, "flags": 4},
|
||||
{"matrix": [2, 8], "x": 161, "y": 38, "flags": 4},
|
||||
{"matrix": [2, 9], "x": 180, "y": 38, "flags": 4},
|
||||
{"matrix": [2, 10], "x": 199, "y": 38, "flags": 4},
|
||||
{"matrix": [2, 11], "x": 215, "y": 38, "flags": 1},
|
||||
{"matrix": [3, 12], "x": 215, "y": 51, "flags": 1},
|
||||
{"matrix": [3, 10], "x": 199, "y": 51, "flags": 4},
|
||||
{"matrix": [3, 9], "x": 180, "y": 51, "flags": 4},
|
||||
{"matrix": [3, 8], "x": 161, "y": 51, "flags": 4},
|
||||
{"matrix": [3, 7], "x": 142, "y": 51, "flags": 4},
|
||||
{"matrix": [3, 6], "x": 123, "y": 51, "flags": 4},
|
||||
{"matrix": [3, 5], "x": 104, "y": 51, "flags": 4},
|
||||
{"matrix": [3, 4], "x": 84, "y": 51, "flags": 4},
|
||||
{"matrix": [3, 3], "x": 66, "y": 51, "flags": 4},
|
||||
{"matrix": [3, 2], "x": 47, "y": 51, "flags": 4},
|
||||
{"matrix": [3, 1], "x": 28, "y": 51, "flags": 4},
|
||||
{"matrix": [3, 0], "x": 9, "y": 51, "flags": 1},
|
||||
{"matrix": [4, 0], "x": 9, "y": 64, "flags": 1},
|
||||
{"matrix": [4, 1], "x": 28, "y": 64, "flags": 1},
|
||||
{"matrix": [4, 2], "x": 47, "y": 64, "flags": 1},
|
||||
{"matrix": [4, 3], "x": 66, "y": 64, "flags": 1},
|
||||
{"matrix": [4, 4], "x": 84, "y": 64, "flags": 1},
|
||||
{"matrix": [4, 5], "x": 104, "y": 64, "flags": 1},
|
||||
{"matrix": [4, 6], "x": 123, "y": 64, "flags": 1},
|
||||
{"matrix": [4, 7], "x": 142, "y": 64, "flags": 1},
|
||||
{"matrix": [4, 8], "x": 161, "y": 64, "flags": 1},
|
||||
{"matrix": [4, 9], "x": 180, "y": 64, "flags": 1},
|
||||
{"matrix": [4, 10], "x": 199, "y": 64, "flags": 1},
|
||||
{"matrix": [4, 12], "x": 215, "y": 64, "flags": 1}
|
||||
]
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
/* Copyright 2020 RGBKB
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
// 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.
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layer_number {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_FN,
|
||||
_ADJ
|
||||
};
|
||||
|
||||
#define FN_ESC LT(_FN, KC_ESC)
|
||||
#define FN_CAPS LT(_FN, KC_CAPS)
|
||||
#define QWERTY DF(_QWERTY)
|
||||
#define COLEMAK DF(_COLEMAK)
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT_all(
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||
KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_RSPC,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, RM_TOGG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||
),
|
||||
|
||||
[_COLEMAK] = LAYOUT_all(
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_RSPC, KC_ENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, RM_TOGG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||
),
|
||||
|
||||
[_FN] = LAYOUT_all(
|
||||
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_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_LBRC, _______, KC_RBRC, _______, _______, _______,
|
||||
_______, _______, _______, RM_NEXT, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_ADJ] = LAYOUT_all(
|
||||
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,
|
||||
_______, RM_SATD, RM_VALU, RM_SATU, QK_BOOT, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______,
|
||||
_______, RM_HUED, RM_VALD, RM_HUEU, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______,
|
||||
_______, RM_SPDD, _______, RM_SPDU, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______,
|
||||
_______, _______, _______, RM_NEXT, _______, _______, _______, KC_P0, KC_PDOT, KC_NUM, _QWERTY, _COLEMAK
|
||||
)
|
||||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("RGBKB Pan\n"), false);
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
uint8_t layer = get_highest_layer(layer_state|default_layer_state);
|
||||
switch (layer) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR("Colemak\n"), false);
|
||||
break;
|
||||
case _FN:
|
||||
oled_write_P(PSTR("Function\n"), false);
|
||||
break;
|
||||
case _ADJ:
|
||||
oled_write_P(PSTR("Adjust\n"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("Undefined\n"), false);
|
||||
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||
//oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false);
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { // First encoder - right
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
} else if (index == 1) { // Second encoder - left
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
35
keyboards/rgbkb/pan/keymaps/default/keymap.json
Normal file
35
keyboards/rgbkb/pan/keymaps/default/keymap.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"keyboard": "rgbkb/pan/rev1/32a",
|
||||
"keymap": "default",
|
||||
"layout": "LAYOUT_all",
|
||||
"layers": [
|
||||
[
|
||||
"QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_BSPC", "KC_DEL",
|
||||
"KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSLS",
|
||||
"LT(2, KC_CAPS)", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_ENT",
|
||||
"KC_LSFT", "KC_BSLS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "SC_RSPC",
|
||||
"KC_LCTL", "KC_LGUI", "KC_LALT", "RM_TOGG", "MO(3)", "KC_SPC", "KC_SPC", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RIGHT"
|
||||
],
|
||||
[
|
||||
"QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_BSPC", "KC_DEL",
|
||||
"KC_TAB", "KC_Q", "KC_W", "KC_F", "KC_P", "KC_G", "KC_J", "KC_L", "KC_U", "KC_Y", "KC_SCLN", "KC_BSLS",
|
||||
"LT(2, KC_CAPS)", "KC_A", "KC_R", "KC_S", "KC_T", "KC_D", "KC_H", "KC_N", "KC_E", "KC_I", "KC_O", "KC_ENT",
|
||||
"KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "SC_RSPC", "KC_ENT",
|
||||
"KC_LCTL", "KC_LGUI", "KC_LALT", "RM_TOGG", "MO(3)", "KC_SPC", "KC_SPC", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RIGHT"
|
||||
],
|
||||
[
|
||||
"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_PGDN", "KC_UP", "KC_PGUP", "_______", "_______", "_______", "KC_PGDN", "KC_UP", "KC_PGUP", "KC_PSCR", "KC_HOME",
|
||||
"_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "_______", "_______", "_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_INS", "KC_END",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "KC_LBRC", "_______", "KC_RBRC", "_______", "_______", "_______",
|
||||
"_______", "_______", "_______", "RM_NEXT", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______"
|
||||
],
|
||||
[
|
||||
"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",
|
||||
"_______", "RM_SATD", "RM_VALU", "RM_SATU", "QK_BOOT", "_______", "_______", "KC_P7", "KC_P8", "KC_P9", "_______", "_______",
|
||||
"_______", "RM_HUED", "RM_VALD", "RM_HUEU", "_______", "_______", "_______", "KC_P4", "KC_P5", "KC_P6", "_______", "_______",
|
||||
"_______", "RM_SPDD", "_______", "RM_SPDU", "_______", "_______", "_______", "KC_P1", "KC_P2", "KC_P3", "_______", "_______", "_______",
|
||||
"_______", "_______", "_______", "RM_NEXT", "_______", "_______", "_______", "KC_P0", "KC_PDOT", "KC_NUM", "DF(0)", "DF(1)"
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# RGB layout selection
|
||||
RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips
|
||||
STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this.
|
||||
@@ -1,116 +0,0 @@
|
||||
/* Copyright 2020 RGBKB
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
// 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.
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layer_number {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_FN,
|
||||
_ADJ
|
||||
};
|
||||
|
||||
#define FN_ESC LT(_FN, KC_ESC)
|
||||
#define FN_CAPS LT(_FN, KC_CAPS)
|
||||
#define QWERTY DF(_QWERTY)
|
||||
#define COLEMAK DF(_COLEMAK)
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT_eee(
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||
KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SC_RSPC,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, RM_TOGG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
[_COLEMAK] = LAYOUT_eee(
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, RM_TOGG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
[_FN] = LAYOUT_eee(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_PSCR,
|
||||
_______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_LBRC, _______, KC_RBRC, _______, _______,
|
||||
_______, _______, _______, RM_NEXT, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_ADJ] = LAYOUT_eee(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_PSCR,
|
||||
_______, RM_SATD, RM_VALU, RM_SATU, QK_BOOT, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______,
|
||||
_______, RM_HUED, RM_VALD, RM_HUEU, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______,
|
||||
_______, RM_SPDD, _______, RM_SPDU, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______,
|
||||
_______, _______, _______, RM_NEXT, _______, _______, _______, KC_P0, KC_PDOT, KC_NUM, QWERTY, COLEMAK
|
||||
)
|
||||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("RGBKB Pan\n"), false);
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
uint8_t layer = get_highest_layer(layer_state|default_layer_state);
|
||||
switch (layer) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR("Colemak\n"), false);
|
||||
break;
|
||||
case _FN:
|
||||
oled_write_P(PSTR("Function\n"), false);
|
||||
break;
|
||||
case _ADJ:
|
||||
oled_write_P(PSTR("Adjust\n"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("Undefined\n"), false);
|
||||
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||
//oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false);
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { // First encoder - right
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
} else if (index == 1) { // Second encoder - left
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
35
keyboards/rgbkb/pan/keymaps/default_eee/keymap.json
Normal file
35
keyboards/rgbkb/pan/keymaps/default_eee/keymap.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"keyboard": "rgbkb/pan/rev1/32a",
|
||||
"keymap": "default_eee",
|
||||
"layout": "LAYOUT_eee",
|
||||
"layers": [
|
||||
[
|
||||
"QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_DEL",
|
||||
"KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSLS",
|
||||
"LT(2, KC_CAPS)", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_ENT",
|
||||
"KC_LSFT", "KC_BSLS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "SC_RSPC",
|
||||
"KC_LCTL", "KC_LGUI", "KC_LALT", "RM_TOGG", "MO(3)", "KC_SPC", "KC_SPC", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RGHT"
|
||||
],
|
||||
[
|
||||
"QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_DEL",
|
||||
"KC_TAB", "KC_Q", "KC_W", "KC_F", "KC_P", "KC_G", "KC_J", "KC_L", "KC_U", "KC_Y", "KC_SCLN", "KC_BSLS",
|
||||
"LT(2, KC_CAPS)", "KC_A", "KC_R", "KC_S", "KC_T", "KC_D", "KC_H", "KC_N", "KC_E", "KC_I", "KC_O", "KC_ENT",
|
||||
"KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_ENT",
|
||||
"KC_LCTL", "KC_LGUI", "KC_LALT", "RM_TOGG", "MO(3)", "KC_SPC", "KC_SPC", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RGHT"
|
||||
],
|
||||
[
|
||||
"KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_PSCR",
|
||||
"_______", "KC_PGDN", "KC_UP", "KC_PGUP", "_______", "_______", "_______", "KC_PGDN", "KC_UP", "KC_PGUP", "KC_PSCR", "KC_HOME",
|
||||
"_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "_______", "_______", "_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_INS", "KC_END",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "KC_LBRC", "_______", "KC_RBRC", "_______", "_______",
|
||||
"_______", "_______", "_______", "RM_NEXT", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______"
|
||||
],
|
||||
[
|
||||
"KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_PSCR",
|
||||
"_______", "RM_SATD", "RM_VALU", "RM_SATU", "QK_BOOT", "_______", "_______", "KC_P7", "KC_P8", "KC_P9", "_______", "_______",
|
||||
"_______", "RM_HUED", "RM_VALD", "RM_HUEU", "_______", "_______", "_______", "KC_P4", "KC_P5", "KC_P6", "_______", "_______",
|
||||
"_______", "RM_SPDD", "_______", "RM_SPDU", "_______", "_______", "_______", "KC_P1", "KC_P2", "KC_P3", "_______", "_______",
|
||||
"_______", "_______", "_______", "RM_NEXT", "_______", "_______", "_______", "KC_P0", "KC_PDOT", "KC_NUM", "DF(0)", "DF(1)"
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# RGB layout selection
|
||||
RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips
|
||||
STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this.
|
||||
@@ -1,116 +0,0 @@
|
||||
/* Copyright 2020 RGBKB
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
// 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.
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layer_number {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_FN,
|
||||
_ADJ
|
||||
};
|
||||
|
||||
#define FN_ESC LT(_FN, KC_ESC)
|
||||
#define FN_CAPS LT(_FN, KC_CAPS)
|
||||
#define QWERTY DF(_QWERTY)
|
||||
#define COLEMAK DF(_COLEMAK)
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT_sss(
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||
KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_ADJ),KC_RCTL
|
||||
),
|
||||
|
||||
[_COLEMAK] = LAYOUT_sss(
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT,
|
||||
KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_ADJ),KC_RCTL
|
||||
),
|
||||
|
||||
[_FN] = LAYOUT_sss(
|
||||
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_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_LBRC, _______, KC_RBRC, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_ADJ] = LAYOUT_sss(
|
||||
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,
|
||||
_______, RM_SATD, RM_VALU, RM_SATU, QK_BOOT, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______,
|
||||
_______, RM_HUED, RM_VALD, RM_HUEU, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______,
|
||||
_______, RM_SPDD, _______, RM_SPDU, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______,
|
||||
_______, _______, _______, _______, QWERTY, _______, COLEMAK
|
||||
)
|
||||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("RGBKB Pan\n"), false);
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
uint8_t layer = get_highest_layer(layer_state|default_layer_state);
|
||||
switch (layer) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR("Colemak\n"), false);
|
||||
break;
|
||||
case _FN:
|
||||
oled_write_P(PSTR("Function\n"), false);
|
||||
break;
|
||||
case _ADJ:
|
||||
oled_write_P(PSTR("Adjust\n"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("Undefined\n"), false);
|
||||
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||
//oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false);
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { // First encoder - right
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
} else if (index == 1) { // Second encoder - left
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
35
keyboards/rgbkb/pan/keymaps/default_sss/keymap.json
Normal file
35
keyboards/rgbkb/pan/keymaps/default_sss/keymap.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"keyboard": "rgbkb/pan/rev1/32a",
|
||||
"keymap": "default_sss",
|
||||
"layout": "LAYOUT_sss",
|
||||
"layers": [
|
||||
[
|
||||
"QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_BSPC", "KC_DEL",
|
||||
"KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSLS",
|
||||
"LT(2, KC_CAPS)", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_ENT",
|
||||
"KC_LSFT", "KC_BSLS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT",
|
||||
"KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(3)", "KC_RCTL"
|
||||
],
|
||||
[
|
||||
"QK_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_BSPC", "KC_DEL",
|
||||
"KC_TAB", "KC_Q", "KC_W", "KC_F", "KC_P", "KC_G", "KC_J", "KC_L", "KC_U", "KC_Y", "KC_SCLN", "KC_BSLS",
|
||||
"LT(2, KC_CAPS)", "KC_A", "KC_R", "KC_S", "KC_T", "KC_D", "KC_H", "KC_N", "KC_E", "KC_I", "KC_O", "KC_ENT",
|
||||
"KC_LSFT", "KC_BSLS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT",
|
||||
"KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(3)", "KC_RCTL"
|
||||
],
|
||||
[
|
||||
"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_PGDN", "KC_UP", "KC_PGUP", "_______", "_______", "_______", "KC_PGDN", "KC_UP", "KC_PGUP", "KC_PSCR", "KC_HOME",
|
||||
"_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "_______", "_______", "_______", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_INS", "KC_END",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "KC_LBRC", "_______", "KC_RBRC", "_______", "_______", "_______",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______"
|
||||
],
|
||||
[
|
||||
"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",
|
||||
"_______", "RM_SATD", "RM_VALU", "RM_SATU", "QK_BOOT", "_______", "_______", "KC_P7", "KC_P8", "KC_P9", "_______", "_______",
|
||||
"_______", "RM_HUED", "RM_VALD", "RM_HUEU", "_______", "_______", "_______", "KC_P4", "KC_P5", "KC_P6", "_______", "_______",
|
||||
"_______", "RM_SPDD", "_______", "RM_SPDU", "_______", "_______", "_______", "KC_P1", "KC_P2", "KC_P3", "_______", "_______",
|
||||
"_______", "_______", "_______", "_______", "_______", "DF(0)", "_______", "DF(1)"
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# RGB layout selection
|
||||
RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips
|
||||
STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this.
|
||||
@@ -1,34 +1,15 @@
|
||||
/* Copyright 2020 RGBKB
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
// Copyright 2020 RGBKB
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "quantum.h"
|
||||
#include "rgb_matrix_types.h"
|
||||
|
||||
#if defined RGB_MATRIX_ENABLE
|
||||
# if defined(KEYBOARD_rgbkb_pan_rev1)
|
||||
# include "ws2812.h"
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# include "ws2812.h"
|
||||
|
||||
// Set an led in the buffer to a color
|
||||
static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) {
|
||||
# if defined(RGB_ENCODERS) || defined(STAGGERED_RGB_ENCODERS)
|
||||
if (i == 0 || i == 1) { // if encoder LEDs, change LEDs
|
||||
if (i == 0 || i == 1) { // Encoder LEDs require GBR sequence
|
||||
ws2812_set_color(i, g, b, r);
|
||||
} else
|
||||
# endif
|
||||
{
|
||||
} else {
|
||||
ws2812_set_color(i, r, g, b);
|
||||
}
|
||||
}
|
||||
@@ -39,74 +20,35 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
|
||||
.set_color = setled,
|
||||
.set_color_all = ws2812_set_color_all,
|
||||
};
|
||||
# endif
|
||||
|
||||
// clang-format off
|
||||
led_config_t g_led_config = { {
|
||||
{ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
|
||||
{ 0, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 },
|
||||
{ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1 },
|
||||
{ 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40 },
|
||||
{ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, NO_LED }
|
||||
}, {
|
||||
# ifdef STAGGERED_RGB_ENCODERS
|
||||
{0, -19},{228, -19},
|
||||
{0, 0}, {14, 0}, {33, 0}, {52, 0}, {71, 0}, {90, 0}, {109, 0}, {128, 0}, {147, 0}, {166, 0}, {185, 0}, {204, 0}, {223, 0},
|
||||
{209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19},
|
||||
{0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38},
|
||||
{223, 57}, {204, 57}, {185, 57}, {171, 57}, {147, 57}, {128, 57}, {109, 57}, {90, 57}, {71, 57}, {52, 57}, {33, 57}, {14, 57}, {0, 57},
|
||||
{0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76},
|
||||
# elif defined RGB_ENCODERS
|
||||
{0, -19},{228, -19},
|
||||
{0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0},
|
||||
{209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19},
|
||||
{0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38},
|
||||
{209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57},
|
||||
{0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76},
|
||||
{0, 95},{19, 95}, //not used
|
||||
# elif defined STAGGERED_LAYOUT
|
||||
{0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, {0, 0},
|
||||
{209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19},
|
||||
{0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38},
|
||||
{209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, {0, 0},
|
||||
{0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76},
|
||||
{0, 95},{19, 95},//not used
|
||||
# else
|
||||
{0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0},
|
||||
{209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19},
|
||||
{0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38},
|
||||
{209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57},
|
||||
{0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76},
|
||||
{0, 0},{0, 0}, {0, 0},{0, 0},//not used
|
||||
# endif
|
||||
}, {
|
||||
# ifdef STAGGERED_RGB_ENCODERS
|
||||
1, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
# elif defined RGB_ENCODERS
|
||||
1, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
# elif defined STAGGERED_LAYOUT
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
# else
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
# endif
|
||||
} };
|
||||
// clang-format on
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
return false;
|
||||
}
|
||||
oled_write_P(PSTR("RGBKB Pan\n"), false);
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
uint8_t layer = get_highest_layer(layer_state | default_layer_state);
|
||||
switch (layer) {
|
||||
case 0:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
break;
|
||||
case 1:
|
||||
oled_write_P(PSTR("Colemak\n"), false);
|
||||
break;
|
||||
case 2:
|
||||
oled_write_P(PSTR("Function\n"), false);
|
||||
break;
|
||||
case 3:
|
||||
oled_write_P(PSTR("Adjust\n"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("Undefined\n"), false);
|
||||
}
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
RGB_MATRIX_KEYPRESSES ?= no # Enable reactive per-key effects.
|
||||
RGB_MATRIX_FRAMEBUFFER_EFFECTS ?= no # Enable frame buffer effects like the typing heatmap.
|
||||
|
||||
# RGB layout selection
|
||||
STAGGERED_LAYOUT ?= no # If you soldered R1-A12 and R4-A12, enable this.
|
||||
RGB_ENCODERS ?= yes # For RGB encoders, solder on both WS2811 chips
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_KEYPRESSES
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(STAGGERED_LAYOUT)), yes)
|
||||
OPT_DEFS += -DSTAGGERED_LAYOUT
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_ENCODERS)), yes)
|
||||
OPT_DEFS += -DRGB_ENCODERS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_ENCODERS)), yes)
|
||||
ifeq ($(strip $(STAGGERED_LAYOUT)), yes)
|
||||
OPT_DEFS += -DSTAGGERED_RGB_ENCODERS=$(strip $(STAGGERED_RGB_ENCODERS))
|
||||
endif
|
||||
endif
|
||||
Reference in New Issue
Block a user