diff --git a/keyboards/rgbkb/pan/info.json b/keyboards/rgbkb/pan/info.json index d151fd68d63..e7ea402e072 100644 --- a/keyboards/rgbkb/pan/info.json +++ b/keyboards/rgbkb/pan/info.json @@ -14,72 +14,205 @@ "layouts": { "LAYOUT_all": { "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": [0, 7], "x": 7, "y": 0}, - {"matrix": [0, 8], "x": 8, "y": 0}, - {"matrix": [0, 9], "x": 9, "y": 0}, - {"matrix": [0, 10], "x": 10, "y": 0}, - {"matrix": [0, 11], "x": 11, "y": 0}, - {"matrix": [0, 12], "x": 12, "y": 0}, + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "Backspace", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "Delete", "matrix": [0, 12], "x": 12, "y": 0}, - {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, - {"matrix": [1, 1], "x": 1.5, "y": 1}, - {"matrix": [1, 2], "x": 2.5, "y": 1}, - {"matrix": [1, 3], "x": 3.5, "y": 1}, - {"matrix": [1, 4], "x": 4.5, "y": 1}, - {"matrix": [1, 5], "x": 5.5, "y": 1}, - {"matrix": [1, 6], "x": 6.5, "y": 1}, - {"matrix": [1, 7], "x": 7.5, "y": 1}, - {"matrix": [1, 8], "x": 8.5, "y": 1}, - {"matrix": [1, 9], "x": 9.5, "y": 1}, - {"matrix": [1, 10], "x": 10.5, "y": 1}, - {"matrix": [1, 11], "x": 11.5, "y": 1, "w": 1.5}, + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "\\", "matrix": [1, 11], "x": 11.5, "y": 1, "w": 1.5}, - {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, - {"matrix": [2, 1], "x": 1.5, "y": 2}, - {"matrix": [2, 2], "x": 2.5, "y": 2}, - {"matrix": [2, 3], "x": 3.5, "y": 2}, - {"matrix": [2, 4], "x": 4.5, "y": 2}, - {"matrix": [2, 5], "x": 5.5, "y": 2}, - {"matrix": [2, 6], "x": 6.5, "y": 2}, - {"matrix": [2, 7], "x": 7.5, "y": 2}, - {"matrix": [2, 8], "x": 8.5, "y": 2}, - {"matrix": [2, 9], "x": 9.5, "y": 2}, - {"matrix": [2, 10], "x": 10.5, "y": 2}, - {"matrix": [2, 11], "x": 11.5, "y": 2, "w": 1.5}, + {"label": "Fn/Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"label": "A", "matrix": [2, 1], "x": 1.5, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.5, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.5, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.5, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.5, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.5, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.5, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.5, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.5, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 10.5, "y": 2}, + {"label": "Enter", "matrix": [2, 11], "x": 11.5, "y": 2, "w": 1.5}, - {"matrix": [3, 0], "x": 0, "y": 3}, - {"matrix": [3, 1], "x": 1, "y": 3}, - {"matrix": [3, 2], "x": 2, "y": 3}, - {"matrix": [3, 3], "x": 3, "y": 3}, - {"matrix": [3, 4], "x": 4, "y": 3}, - {"matrix": [3, 5], "x": 5, "y": 3}, - {"matrix": [3, 6], "x": 6, "y": 3}, - {"matrix": [3, 7], "x": 7, "y": 3}, - {"matrix": [3, 8], "x": 8, "y": 3}, - {"matrix": [3, 9], "x": 9, "y": 3}, - {"matrix": [3, 10], "x": 10, "y": 3}, - {"matrix": [3, 11], "x": 11, "y": 3}, - {"matrix": [3, 12], "x": 12, "y": 3}, + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3}, + {"label": "\\", "matrix": [3, 1], "x": 1, "y": 3}, + {"label": "Z", "matrix": [3, 2], "x": 2, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12, "y": 3}, - {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, - {"matrix": [4, 1], "x": 1.5, "y": 4}, - {"matrix": [4, 2], "x": 2.5, "y": 4}, - {"matrix": [4, 3], "x": 3.5, "y": 4}, - {"matrix": [4, 4], "x": 4.5, "y": 4}, - {"matrix": [4, 5], "x": 5.5, "y": 4}, - {"matrix": [4, 6], "x": 6.5, "y": 4}, - {"matrix": [4, 7], "x": 7.5, "y": 4}, - {"matrix": [4, 8], "x": 8.5, "y": 4}, - {"matrix": [4, 9], "x": 9.5, "y": 4}, - {"matrix": [4, 10], "x": 10.5, "y": 4}, - {"matrix": [4, 12], "x": 11.5, "y": 4, "w": 1.5} + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "GUI", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4}, + {"label": "Toggle RGB", "matrix": [4, 3], "x": 3.5, "y": 4}, + {"label": "Fn3", "matrix": [4, 4], "x": 4.5, "y": 4}, + {"label": "Space", "matrix": [4, 5], "x": 5.5, "y": 4}, + {"label": "Space", "matrix": [4, 6], "x": 6.5, "y": 4}, + {"label": "Fn2", "matrix": [4, 7], "x": 7.5, "y": 4}, + {"label": "\u2190", "matrix": [4, 8], "x": 8.5, "y": 4}, + {"label": "\u2193", "matrix": [4, 9], "x": 9.5, "y": 4}, + {"label": "\u2191", "matrix": [4, 10], "x": 10.5, "y": 4}, + {"label": "\u2192", "matrix": [4, 12], "x": 11.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_eee": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, + {"label": "1", "matrix": [0, 1], "x": 1.5, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2.5, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3.5, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4.5, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5.5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6.5, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7.5, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8.5, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9.5, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10.5, "y": 0}, + {"label": "Delete", "matrix": [0, 12], "x": 11.5, "y": 0, "w": 1.5}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "\\", "matrix": [1, 11], "x": 11.5, "y": 1, "w": 1.5}, + + {"label": "Fn/Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"label": "A", "matrix": [2, 1], "x": 1.5, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.5, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.5, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.5, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.5, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.5, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.5, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.5, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.5, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 10.5, "y": 2}, + {"label": "Enter", "matrix": [2, 11], "x": 11.5, "y": 2, "w": 1.5}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.5}, + {"label": "Z", "matrix": [3, 1], "x": 1.5, "y": 3}, + {"label": "X", "matrix": [3, 2], "x": 2.5, "y": 3}, + {"label": "C", "matrix": [3, 3], "x": 3.5, "y": 3}, + {"label": "V", "matrix": [3, 4], "x": 4.5, "y": 3}, + {"label": "B", "matrix": [3, 5], "x": 5.5, "y": 3}, + {"label": "N", "matrix": [3, 6], "x": 6.5, "y": 3}, + {"label": "M", "matrix": [3, 7], "x": 7.5, "y": 3}, + {"label": ",", "matrix": [3, 8], "x": 8.5, "y": 3}, + {"label": ".", "matrix": [3, 9], "x": 9.5, "y": 3}, + {"label": "/", "matrix": [3, 10], "x": 10.5, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 11.5, "y": 3, "w": 1.5}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "GUI", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4}, + {"label": "Toggle RGB", "matrix": [4, 3], "x": 3.5, "y": 4}, + {"label": "Fn3", "matrix": [4, 4], "x": 4.5, "y": 4}, + {"label": "Space", "matrix": [4, 5], "x": 5.5, "y": 4}, + {"label": "Space", "matrix": [4, 6], "x": 6.5, "y": 4}, + {"label": "Fn2", "matrix": [4, 7], "x": 7.5, "y": 4}, + {"label": "\u2190", "matrix": [4, 8], "x": 8.5, "y": 4}, + {"label": "\u2193", "matrix": [4, 9], "x": 9.5, "y": 4}, + {"label": "\u2191", "matrix": [4, 10], "x": 10.5, "y": 4}, + {"label": "\u2192", "matrix": [4, 12], "x": 11.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_sss": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "Backspace", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "Delete", "matrix": [0, 12], "x": 12, "y": 0}, + + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "\\", "matrix": [1, 11], "x": 11.5, "y": 1, "w": 1.5}, + + {"label": "Fn/Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "Enter", "matrix": [2, 11], "x": 11.75, "y": 2, "w": 1.25}, + + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3}, + {"label": "\\", "matrix": [3, 1], "x": 1, "y": 3}, + {"label": "Z", "matrix": [3, 2], "x": 2, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8, "y": 3}, + {"label": ",", "matrix": [3, 9], "x": 9, "y": 3}, + {"label": ".", "matrix": [3, 10], "x": 10, "y": 3}, + {"label": "/", "matrix": [3, 11], "x": 11, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12, "y": 3}, + + {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"label": "GUI", "matrix": [4, 1], "x": 1.25, "y": 4}, + {"label": "Alt", "matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.25}, + {"label": "Space", "matrix": [4, 6], "x": 3.5, "y": 4, "w": 6.25}, + {"label": "Alt", "matrix": [4, 9], "x": 9.75, "y": 4}, + {"label": "GUI", "matrix": [4, 10], "x": 10.75, "y": 4}, + {"label": "Ctrl", "matrix": [4, 12], "x": 11.75, "y": 4, "w": 1.25} ] } } diff --git a/keyboards/rgbkb/pan/keymaps/default_eee/keymap.c b/keyboards/rgbkb/pan/keymaps/default_eee/keymap.c new file mode 100644 index 00000000000..57b0dafd6a4 --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default_eee/keymap.c @@ -0,0 +1,116 @@ + /* 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 . + */ +// 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, RGB_TOG, 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, RGB_TOG, 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, _______, _______, + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_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, + _______, RGB_SAD, RGB_VAI, RGB_SAI, QK_BOOT, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, + _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, + _______, _______, _______, RGB_MOD, _______, _______, _______, 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; +} diff --git a/keyboards/rgbkb/pan/keymaps/default_eee/rules.mk b/keyboards/rgbkb/pan/keymaps/default_eee/rules.mk new file mode 100644 index 00000000000..9ad29c645c0 --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default_eee/rules.mk @@ -0,0 +1,6 @@ +# 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. + +# Do not edit past here +include keyboards/$(KEYBOARD)/post_rules.mk diff --git a/keyboards/rgbkb/pan/keymaps/default_sss/keymap.c b/keyboards/rgbkb/pan/keymaps/default_sss/keymap.c new file mode 100644 index 00000000000..a872175c75c --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default_sss/keymap.c @@ -0,0 +1,116 @@ + /* 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 . + */ +// 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, + _______, RGB_SAD, RGB_VAI, RGB_SAI, QK_BOOT, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, + _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, 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; +} diff --git a/keyboards/rgbkb/pan/keymaps/default_sss/rules.mk b/keyboards/rgbkb/pan/keymaps/default_sss/rules.mk new file mode 100644 index 00000000000..9ad29c645c0 --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default_sss/rules.mk @@ -0,0 +1,6 @@ +# 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. + +# Do not edit past here +include keyboards/$(KEYBOARD)/post_rules.mk diff --git a/keyboards/rgbkb/pan/matrix_diagram.md b/keyboards/rgbkb/pan/matrix_diagram.md new file mode 100644 index 00000000000..4475add027e --- /dev/null +++ b/keyboards/rgbkb/pan/matrix_diagram.md @@ -0,0 +1,83 @@ +# Matrix Diagram for RGBKB Pan + +``` +┌──┐ ┌──┐ +│E1│ │E2│ +└──┘ └──┘ + +Top Row Options ───────────────────────────────────── + Exx +┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +│00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0C │ +└─────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴─────┘ + + Sxx +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + ┌───────┐ + │0C │ + └───────┘ + +Middle Three Rows Options ─────────────────────────── + xEx +┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +│10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │ +├─────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼─────┤ +│20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │ +├─────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼─────┤ +│30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3C │ +└─────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴─────┘ + + xSx +┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ ┌─────┐ +│10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ └┐1B │ ISO Enter +│20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │ │ │ +├───┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ └────┘ +│30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +┌───────┐ +│30 │ +└───────┘ + + xAx - xSx, ANSI Only + xIx - xSx, ISO Only + +Bottom Row Options ────────────────────────────────── + + xxG +┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +│40 │41 │42 │43 │44 │45 │46 │47 │48 │49 │4A │4C │ 1.5u/10x 1u/1.5u +└─────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴─────┘ + + xxE +┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +│40 │41 │42 │43 │44 │45 │46 │47 │48 │49 │4A │4C │ 1.5u/10x 1u/1.5u +└─────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴─────┘ + ┌───┬─────┬───────────────────────────┬─────┬───┐ + │40 │41 │46 │4A │4C │ 1u/1.5u/7u/1.5u/1u + └───┴─────┴───────────────────────────┴─────┴───┘ + ┌───┬─────┬─────┬───────┬───────┬─────┬─────┬───┐ + │40 │41 │43 │45 │47 │48 │4A │4C │ 1u/1.5u/1.5u/2u/2u/1.5u/1.5u/1u + └───┴─────┴─────┴───────┴───────┴─────┴─────┴───┘ + ┌───────┐ + │46 │ 2u + └───────┘ + + xxK - Same as xxE, with HHKB-style blockers + + xxS +┌─────┬─────┬───────────────────────────┬─────┬─────┐ +│40 │41 │46 │4A │4C │ 1.5u/1.5u/7u/1.5u/1.5u +└─────┴─────┴───────────────────────────┴─────┴─────┘ +┌────┬───┬────┬────┬────────┬──────────┬───┬───┬────┐ +│40 │41 │42 │43 │45 │47 │49 │4A │4C │ 1.25u/1u/1.25u/1.25u/2.25u/2.75u/1u/1u/1.25u +└────┴───┴────┴────┴────────┴──────────┴───┴───┴────┘ +┌────┬───┬────┬────────────────────────┬───┬───┬────┐ +│40 │41 │42 │46 │49 │4A │4C │ 1.25u/1u/1.25u/6.25u/1u/1u/1.25u +└────┴───┴────┴────────────────────────┴───┴───┴────┘ + xxH - Same as xxS, with HHKB-style blockers + + xxU - Universal, supports all R5 layouts +```