Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57475caab0 | ||
|
|
34205f5bb5 | ||
|
|
9f1608a6a2 | ||
|
|
0a056cfd81 | ||
|
|
5c1442766c | ||
|
|
816f2f9cc2 | ||
|
|
666623d39a | ||
|
|
0eabb01e27 | ||
|
|
b664db3cf3 | ||
|
|
a5ecd4eb87 | ||
|
|
f3f444c1df | ||
|
|
81c51ec51c | ||
|
|
b5a12fa6d3 | ||
|
|
29c82cfb33 | ||
|
|
2cd684f8e0 | ||
|
|
c4d05010cb | ||
|
|
6276f54752 | ||
|
|
8e820cde13 | ||
|
|
572395ac20 | ||
|
|
95c74ae4ae | ||
|
|
3fc710e0b1 | ||
|
|
dd0a35273c | ||
|
|
cf7404630e | ||
|
|
ef872595ae | ||
|
|
eac9ee8d3f | ||
|
|
1d706bd77c | ||
|
|
3e60997edb | ||
|
|
a74846a0db | ||
|
|
038d9118b6 | ||
|
|
be771e5fd2 | ||
|
|
1fbee7c316 | ||
|
|
8b39ae13c7 |
@@ -131,6 +131,16 @@ Check your environment and report problems only:
|
||||
|
||||
qmk doctor -n
|
||||
|
||||
## `qmk format-json`
|
||||
|
||||
Formats a JSON file in a (mostly) human-friendly way. Will usually correctly detect the format of the JSON (info.json or keymap.json) but you can override this with `--format` if neccesary.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk format-json [-f FORMAT] <json_file>
|
||||
```
|
||||
|
||||
## `qmk info`
|
||||
|
||||
Displays information about keyboards and keymaps in QMK. You can use this to get information about a keyboard, show the layouts, display the underlying key matrix, or to pretty-print JSON keymaps.
|
||||
|
||||
@@ -19,12 +19,10 @@ These functions allow you to activate layers in various ways. Note that layers a
|
||||
|
||||
### Caveats :id=caveats
|
||||
|
||||
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Specifically, dual function keys like `LT` and `MT` use a 16 bit keycode. 4 bits are used for the function identifier, the next 12 are divided into the parameters. Layer Tap uses 4 bits for the layer (and is why it's limited to layers 0-15, actually), while Mod Tap does the same, 4 bits for the identifier, 4 bits for which mods are used, and all of them use 8 bits for the keycode. Because of this, the keycode used is limited to `0xFF` (0-255), which are the basic keycodes only.
|
||||
Currently, the `layer` argument of `LT()` is limited to layers 0-15, and the `kc` argument to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. This is because QMK uses 16-bit keycodes, of which 4 bits are used for the function identifier and 4 bits for the layer, leaving only 8 bits for the keycode.
|
||||
|
||||
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||
|
||||
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
|
||||
|
||||
## Working with Layers :id=working-with-layers
|
||||
|
||||
Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
|
||||
|
||||
@@ -50,11 +50,13 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations
|
||||
|
||||
## Caveats
|
||||
|
||||
Unfortunately, these keycodes cannot be used in Mod-Taps or Layer-Taps, since any modifiers specified in the keycode are ignored.
|
||||
Currently, the `kc` argument of `MT()` is limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. This is because QMK uses 16-bit keycodes, of which 3 bits are used for the function identifier, 1 bit for selecting right or left mods, and 4 bits to tell which mods are used, leaving only 8 bits for the keycode. Additionally, if at least one right-handed modifier is specified in a Mod-Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two - for example, Left Control and Right Shift would become Right Control and Right Shift.
|
||||
|
||||
Additionally, you may run into issues when using Remote Desktop Connection on Windows. Because these codes send shift very fast, Remote Desktop may miss the codes.
|
||||
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||
|
||||
To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab. In the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly.
|
||||
You may also run into issues when using Remote Desktop Connection on Windows. Because these keycodes send key events faster than a human, Remote Desktop could miss them.
|
||||
To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly.
|
||||
It can also be mitigated by increasing [`TAP_CODE_DELAY`](config_options.md#behaviors-that-can-be-configured).
|
||||
|
||||
## Other Resources
|
||||
|
||||
|
||||
48
keyboards/anavi/macropad2/keymaps/git/keymap.c
Normal file
48
keyboards/anavi/macropad2/keymaps/git/keymap.c
Normal file
@@ -0,0 +1,48 @@
|
||||
/* Copyright 2021 Leon Anavi <leon@anavi.org>
|
||||
*
|
||||
* 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
|
||||
|
||||
enum custom_keycodes {
|
||||
GITCOMMIT = SAFE_RANGE,
|
||||
GITPUSH
|
||||
};
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Set backlight to the maximum brightness
|
||||
backlight_level(2);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case GITCOMMIT:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("git commit -s\n");
|
||||
}
|
||||
break;
|
||||
case GITPUSH:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("git push\n");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
GITCOMMIT, GITPUSH
|
||||
)
|
||||
};
|
||||
@@ -39,4 +39,15 @@ led_config_t g_led_config = {
|
||||
2, 2, 2, 2, 2, 2
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -50,3 +50,6 @@
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
#endif
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
#endif
|
||||
|
||||
@@ -26,34 +26,19 @@ led_config_t g_led_config = { {
|
||||
{ 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 }
|
||||
}, {
|
||||
// LED Index to Physical Position
|
||||
//I have no idea how to calculate this based on a templete, nor do have a good enough ruler to measure this.
|
||||
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete
|
||||
{ 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, { 225, 0 },
|
||||
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home
|
||||
{ 4, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, { 225, 16 },
|
||||
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up
|
||||
{ 6, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 201, 32 }, { 225, 32 },
|
||||
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down
|
||||
{ 9, 48 }, { 34, 48 }, { 49, 48 }, { 64, 48 }, { 79, 48 }, { 94, 48 }, { 109, 48 }, { 124, 48 }, { 139, 48 }, { 154, 48 }, { 169, 48 }, { 189, 48 }, { 210, 48 }, { 225, 48 },
|
||||
// Ctrl, GUI, Alt, Space, RAlt, FN, Ctrl, Left, Down, Right
|
||||
{ 2, 64 }, { 21, 64 }, { 39, 64 }, { 94, 64 }, { 148, 64 }, { 163, 64 }, { 178, 64 }, { 193, 64 }, { 208, 64 }, { 225, 64 },
|
||||
// UNDERGLOW
|
||||
{ 185, 45 }, { 160, 45 }, { 125, 45 }, { 95, 45 }, { 60, 45 }, { 25, 45 }
|
||||
{ 0, 0}, { 15, 0}, { 30, 0}, { 45, 0}, { 60, 0}, { 75, 0}, { 90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {202, 0}, {225, 0}, // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete
|
||||
{ 4, 16}, { 22, 16}, { 37, 16}, { 52, 16}, { 67, 16}, { 82, 16}, { 97, 16}, {112, 16}, {127, 16}, {142, 16}, {157, 16}, {172, 16}, {187, 16}, {206, 16}, {225, 16}, // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home
|
||||
{ 6, 32}, { 26, 32}, { 41, 32}, { 56, 32}, { 71, 32}, { 86, 32}, {101, 32}, {116, 32}, {131, 32}, {146, 32}, {161, 32}, {176, 32}, {201, 32}, {225, 32}, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up
|
||||
{ 9, 48}, { 34, 48}, { 49, 48}, { 64, 48}, { 79, 48}, { 94, 48}, {109, 48}, {124, 48}, {139, 48}, {154, 48}, {169, 48}, {189, 48}, { 10, 48}, {225, 48}, // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down
|
||||
{ 2, 64}, { 21, 64}, { 39, 64}, { 94, 64}, {148, 64}, {163, 64}, {178, 64}, {193, 64}, {208, 64}, {225, 64}, // Ctrl, GUI, Alt, Space, RAlt, FN, Ctrl, Left, Down, Right
|
||||
{185, 45}, {160, 45}, {125, 45}, { 95, 45}, { 60, 45}, { 25, 45} // UNDERGLOW
|
||||
}, {
|
||||
// LED Index to Flag
|
||||
//need to recheck what should be a modifier
|
||||
|
||||
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
|
||||
// Ctrl, GUI, Alt, Space, RAlt, FN, Ctrl, Left, Down, Right
|
||||
1, 1, 1, 4, 1, 1, 1, 1, 1, 1,
|
||||
// UNDERGLOW
|
||||
2, 2, 2, 2, 2, 2
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down
|
||||
1, 1, 1, 4, 1, 1, 1, 1, 1, 1, // Ctrl, GUI, Alt, Space, RAlt, FN, Ctrl, Left, Down, Right
|
||||
2, 2, 2, 2, 2, 2 // UNDERGLOW
|
||||
} };
|
||||
#endif
|
||||
|
||||
@@ -56,30 +56,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// The number of LEDs connected
|
||||
#define DRIVER_LED_TOTAL 74
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 74
|
||||
//# define RGBLIGHT_HUE_STEP 8
|
||||
//# define RGBLIGHT_SAT_STEP 8
|
||||
//# define RGBLIGHT_VAL_STEP 8
|
||||
//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
/*== all animations enable ==*/
|
||||
//# define RGBLIGHT_ANIMATIONS
|
||||
/*== or choose animations ==*/
|
||||
//# define RGBLIGHT_EFFECT_BREATHING
|
||||
//# define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
//# define RGBLIGHT_EFFECT_SNAKE
|
||||
//# define RGBLIGHT_EFFECT_KNIGHT
|
||||
//# define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
//# define RGBLIGHT_EFFECT_RGB_TEST
|
||||
//# define RGBLIGHT_EFFECT_ALTERNATING
|
||||
/*== customize breathing effect ==*/
|
||||
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||
//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||
/*==== use exp() and sin() ====*/
|
||||
//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||
//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||
#define RGBLED_NUM 74
|
||||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
#endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
|
||||
@@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
/*
|
||||
Templete
|
||||
Template
|
||||
[ ] = LAYOUT_65_ansi(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
|
||||
55
keyboards/bm68rgb/keymaps/via/keymap.c
Normal file
55
keyboards/bm68rgb/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,55 @@
|
||||
/* Copyright 2021 peepeetee
|
||||
*
|
||||
* 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
|
||||
|
||||
// Defines names for use in layer keycodes and the keymap
|
||||
// enum layer_names {
|
||||
// _BASE,
|
||||
// _FN
|
||||
// };
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_65_ansi(
|
||||
KC_ESC, 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_DEL,
|
||||
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_RBRC, KC_BSLS, KC_HOME,
|
||||
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_PGUP,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1),KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[1] = LAYOUT_65_ansi(
|
||||
KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[2] = LAYOUT_65_ansi(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[3] = LAYOUT_65_ansi(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
1
keyboards/bm68rgb/keymaps/via/readme.md
Normal file
1
keyboards/bm68rgb/keymaps/via/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default VIA keymap for bm68rgb
|
||||
1
keyboards/bm68rgb/keymaps/via/rules.mk
Normal file
1
keyboards/bm68rgb/keymaps/via/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
@@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
@@ -22,6 +22,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = WS2812
|
||||
#LTO_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
|
||||
LAYOUTS = 65_ansi
|
||||
|
||||
@@ -58,6 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
#define DRIVER_LED_TOTAL 24 // Number of LEDs
|
||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,4 +35,15 @@ led_config_t g_led_config = { {
|
||||
LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
|
||||
LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL
|
||||
} };
|
||||
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -29,7 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { C5, C4, B6, B7, C7 }
|
||||
#define MATRIX_ROW_PINS_RIGHT { D3, D2, D5, D6, B0 }
|
||||
#define MATRIX_COL_PINS { C6, B4, B3, B2, B1, B0 }
|
||||
/* The last three NO_PIN are dummies to make the same size as MATRIX_ROW_PINS_RIGHT. */
|
||||
#define MATRIX_COL_PINS { C6, B4, B3, B2, B1, B0, NO_PIN, NO_PIN, NO_PIN }
|
||||
#define MATRIX_COL_PINS_RIGHT { C7, B7, B6, B5, B4, B3, B2, C6, D4 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
|
||||
112
keyboards/draytronics/daisy/config.h
Normal file
112
keyboards/draytronics/daisy/config.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/*Copyright 2021 Blake Drayson / Draytronics
|
||||
|
||||
Contact info@draytronics.co.uk
|
||||
|
||||
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
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define VENDOR_ID 0x4454 //DT for DrayTronics
|
||||
#define PRODUCT_ID 0x4441 //DA for Daisy
|
||||
#define DEVICE_VER 0x0100 //Version 1
|
||||
#define MANUFACTURER Draytronics
|
||||
#define PRODUCT DAISY
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 3
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
|
||||
#define MATRIX_ROW_PINS { B0, C0, C1}
|
||||
#define MATRIX_COL_PINS { C2, C3, C4, C5 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define ENCODERS_PAD_A { B1, D0 }
|
||||
#define ENCODERS_PAD_B { B2, D1 }
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
#define TAP_CODE_DELAY 10
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is useful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
//#define GRAVE_ESC_CTRL_OVERRIDE
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
/* disable these deprecated features by default */
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
//Underglow
|
||||
#define RGB_DI_PIN D4 // Underglow led pin
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 4
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
/*== all animations enable ==*/
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#endif
|
||||
19
keyboards/draytronics/daisy/daisy.c
Normal file
19
keyboards/draytronics/daisy/daisy.c
Normal file
@@ -0,0 +1,19 @@
|
||||
/*Copyright 2021 Blake Drayson / Draytronics
|
||||
|
||||
Contact info@draytronics.co.uk
|
||||
|
||||
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 "daisy.h"
|
||||
33
keyboards/draytronics/daisy/daisy.h
Normal file
33
keyboards/draytronics/daisy/daisy.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*Copyright 2021 Blake Drayson / Draytronics
|
||||
|
||||
Contact info@draytronics.co.uk
|
||||
|
||||
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
|
||||
|
||||
#define _x_ KC_NO
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT_daisy( \
|
||||
K00, K03, \
|
||||
K10, K11, K12, K13, \
|
||||
K20, K21, K22, K23 \
|
||||
) { \
|
||||
{ K00, _x_, _x_, K03, }, \
|
||||
{ K10, K11, K12, K13, }, \
|
||||
{ K20, K21, K22, K23, }, \
|
||||
}
|
||||
25
keyboards/draytronics/daisy/info.json
Normal file
25
keyboards/draytronics/daisy/info.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"keyboard_name": "Draytronics DAISY",
|
||||
"url": "https://www.draytronics.co.uk/daisy",
|
||||
"maintainer": "ghostseven",
|
||||
"width": 4,
|
||||
"height": 3,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"", "x":0, "y":0},
|
||||
{"label":"", "x":3, "y":0},
|
||||
|
||||
{"label":"", "x":0, "y":1},
|
||||
{"label":"", "x":1, "y":1},
|
||||
{"label":"", "x":2, "y":1},
|
||||
{"label":"", "x":3, "y":1},
|
||||
|
||||
{"label":"", "x":0, "y":2},
|
||||
{"label":"", "x":1, "y":2},
|
||||
{"label":"", "x":2, "y":2},
|
||||
{"label":"", "x":3, "y":1, "h":2}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
51
keyboards/draytronics/daisy/keymaps/default/keymap.c
Normal file
51
keyboards/draytronics/daisy/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/*Copyright 2021 Blake Drayson / Draytronics
|
||||
|
||||
Contact info@draytronics.co.uk
|
||||
|
||||
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
|
||||
#define _BASE 0 // Base layer
|
||||
#define _CODE 1 // Code layer
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_daisy(
|
||||
KC_MUTE, KC_HOME,
|
||||
MO(_CODE), KC_MPRV, KC_MNXT, KC_MPLY,
|
||||
C(KC_LEFT), C(KC_UP), C(KC_DOWN), C(KC_RIGHT)
|
||||
),
|
||||
[_CODE] = LAYOUT_daisy(
|
||||
KC_MUTE, KC_END,
|
||||
_______, RGB_MOD, RGB_VAI, RGB_TOG,
|
||||
G(S(KC_5)), G(A(KC_ESC)), G(KC_F), RESET
|
||||
)
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLD);
|
||||
} else {
|
||||
tap_code(KC_VOLU);
|
||||
}
|
||||
}
|
||||
else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGUP);
|
||||
} else {
|
||||
tap_code(KC_PGDN);
|
||||
}
|
||||
}
|
||||
}
|
||||
20
keyboards/draytronics/daisy/readme.md
Normal file
20
keyboards/draytronics/daisy/readme.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# DAISY
|
||||

|
||||
|
||||
An open source macro pad with rotary encoders and under glow, designed to be easily built with (mostly) through hole components. More info / kits / PCB designs available at [draytronics.co.uk/daisy](https://www.draytronics.co.uk/daisy)
|
||||
|
||||
* Keyboard Maintainer: [Blake Drayson](https://github.com/ghostseven)
|
||||
* Hardware Supported: DAISY PCB / ATMega328P
|
||||
* Hardware Availability: [draytronics.co.uk](https://draytronics.co.uk)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make draytronics/daisy:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make draytronics/daisy:default:flash
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
VIA design config file avaliable [here](https://www.draytronics.co.uk/f_daisy/draytronics_daisy_via_config.json)
|
||||
23
keyboards/draytronics/daisy/rules.mk
Normal file
23
keyboards/draytronics/daisy/rules.mk
Normal file
@@ -0,0 +1,23 @@
|
||||
# MCU name
|
||||
MCU = atmega328p
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = USBasp
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
ENCODER_ENABLE = yes # Rotary encoder support
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||

|
||||
|
||||
A open source 17 key numpad keyboard, designed to be easily built at home with through hole components. More info / kits / PCB designs available at [draytronics.co.uk/scarlet](draytronics.co.uk)
|
||||
A open source 17 key numpad keyboard, designed to be easily built at home with through hole components. More info / kits / PCB designs available at [draytronics.co.uk/scarlet](https://draytronics.co.uk)
|
||||
|
||||
* Keyboard Maintainer: [Blake Drayson](https://github.com/ghostseven)
|
||||
* Hardware Supported: SCARLET PCB / ATMega32A
|
||||
* Hardware Availability: [draytronics.co.uk](draytronics.co.uk)
|
||||
* Hardware Availability: [draytronics.co.uk](https://draytronics.co.uk)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"keyboard_name": "bolek",
|
||||
"url": "https://github.com/klausweiss/bolek",
|
||||
"maintainer": "klausweiss",
|
||||
"height": 5,
|
||||
"width": 11,
|
||||
"height": 5.25,
|
||||
"width": 12.75,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
@@ -12,34 +12,34 @@
|
||||
{ "label": "E", "x": 2, "y": 0 },
|
||||
{ "label": "R", "x": 3, "y": 0.25 },
|
||||
{ "label": "T", "x": 4, "y": 0.5 },
|
||||
{ "label": "A", "x": 0, "y": 1.25 },
|
||||
{ "label": "S", "x": 1, "y": 1 },
|
||||
{ "label": "D", "x": 2, "y": 1 },
|
||||
{ "label": "F", "x": 3, "y": 1.25 },
|
||||
{ "label": "G", "x": 4, "y": 1.5 },
|
||||
{ "label": "Z", "x": 0, "y": 2.25 },
|
||||
{ "label": "X", "x": 1, "y": 2 },
|
||||
{ "label": "C", "x": 2, "y": 2 },
|
||||
{ "label": "V", "x": 3, "y": 2.25 },
|
||||
{ "label": "B", "x": 4, "y": 2.5 },
|
||||
{ "label": "ESC", "x": 3.25, "y": 3.75 },
|
||||
{ "label": "SPC", "x": 4.25, "y": 4 },
|
||||
{ "label": "TAB", "x": 5.25, "y": 4.25 },
|
||||
{ "label": "Y", "x": 7.75, "y": 0.5 },
|
||||
{ "label": "U", "x": 8.75, "y": 0.25 },
|
||||
{ "label": "I", "x": 9.75, "y": 0 },
|
||||
{ "label": "O", "x": 10.75, "y": 0 },
|
||||
{ "label": "P", "x": 11.75, "y": 0.25 },
|
||||
{ "label": "A", "x": 0, "y": 1.25 },
|
||||
{ "label": "S", "x": 1, "y": 1 },
|
||||
{ "label": "D", "x": 2, "y": 1 },
|
||||
{ "label": "F", "x": 3, "y": 1.25 },
|
||||
{ "label": "G", "x": 4, "y": 1.5 },
|
||||
{ "label": "H", "x": 7.75, "y": 1.5 },
|
||||
{ "label": "J", "x": 8.75, "y": 1.25 },
|
||||
{ "label": "K", "x": 9.75, "y": 1 },
|
||||
{ "label": "L", "x": 10.75, "y": 1 },
|
||||
{ "label": ";", "x": 11.75, "y": 1.25 },
|
||||
{ "label": "Z", "x": 0, "y": 2.25 },
|
||||
{ "label": "X", "x": 1, "y": 2 },
|
||||
{ "label": "C", "x": 2, "y": 2 },
|
||||
{ "label": "V", "x": 3, "y": 2.25 },
|
||||
{ "label": "B", "x": 4, "y": 2.5 },
|
||||
{ "label": "N", "x": 7.75, "y": 2.5 },
|
||||
{ "label": "M", "x": 8.75, "y": 2.25 },
|
||||
{ "label": ",", "x": 9.75, "y": 2 },
|
||||
{ "label": ".", "x": 10.75, "y": 2 },
|
||||
{ "label": "'", "x": 11.75, "y": 2.25 },
|
||||
{ "label": "ESC", "x": 3.25, "y": 3.75 },
|
||||
{ "label": "SPC", "x": 4.25, "y": 4 },
|
||||
{ "label": "TAB", "x": 5.25, "y": 4.25 },
|
||||
{ "label": "RET", "x": 6.5, "y": 4.25 },
|
||||
{ "label": "BSPC", "x": 7.5, "y": 4 },
|
||||
{ "label": "RESET", "x": 8.5, "y": 3.75 }
|
||||
|
||||
44
keyboards/handwired/swiftrax/equator/config.h
Normal file
44
keyboards/handwired/swiftrax/equator/config.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
Copyright 2021 Swiftrax <swiftrax@gmail.com>
|
||||
|
||||
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
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x04D8
|
||||
#define PRODUCT_ID 0xE984
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Swiftrax
|
||||
#define PRODUCT Equator
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
// ROWS: Top to bottom, COLS: Left to right
|
||||
|
||||
#define MATRIX_ROW_PINS { B2, B3, C7, B4, B5 }
|
||||
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D7, D6, D4, D5, D3, D2, D1, D0 }
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
17
keyboards/handwired/swiftrax/equator/equator.c
Normal file
17
keyboards/handwired/swiftrax/equator/equator.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2021 Swiftrax <swiftrax@gmail.com>
|
||||
|
||||
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 "equator.h"
|
||||
51
keyboards/handwired/swiftrax/equator/equator.h
Normal file
51
keyboards/handwired/swiftrax/equator/equator.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
Copyright 2021 Swiftrax <swiftrax@gmail.com>
|
||||
|
||||
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
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define K_NO KC_NO
|
||||
|
||||
#define LAYOUT_unified_bs_rshift( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \
|
||||
K400, K401, K402, K404, K407, K409, K411, K412, K413 \
|
||||
) \
|
||||
{ \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K_NO, K213 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K_NO}, \
|
||||
{ K400, K401, K402, K_NO, K404, K_NO, K_NO, K407, K_NO, K409, K_NO, K411, K412, K413 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_split_bs_rshift( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \
|
||||
K400, K401, K402, K404, K407, K409, K411, K412, K413 \
|
||||
) \
|
||||
{ \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
|
||||
{ K400, K401, K402, K_NO, K404, K_NO, K_NO, K407, K_NO, K409, K_NO, K411, K412, K413 } \
|
||||
}
|
||||
15
keyboards/handwired/swiftrax/equator/info.json
Normal file
15
keyboards/handwired/swiftrax/equator/info.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"keyboard_name": "Equator",
|
||||
"url": "https://github.com/swiftrax",
|
||||
"maintainer": "swiftrax",
|
||||
"width": 16.5,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_unified_bs_rshift": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":8.5, "y":0}, {"label":"*", "x":9.5, "y":0}, {"label":"(", "x":10.5, "y":0}, {"label":")", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"Backspace", "x":14.5, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":8, "y":1}, {"label":"U", "x":9, "y":1}, {"label":"I", "x":10, "y":1}, {"label":"O", "x":11, "y":1}, {"label":"P", "x":12, "y":1}, {"label":"{", "x":13, "y":1}, {"label":"}", "x":14, "y":1}, {"label":"|", "x":15, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":8.25, "y":2}, {"label":"J", "x":9.25, "y":2}, {"label":"K", "x":10.25, "y":2}, {"label":"L", "x":11.25, "y":2}, {"label":":", "x":12.25, "y":2}, {"label":"\"", "x":13.25, "y":2}, {"label":"Enter", "x":14.25, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":8.75, "y":3}, {"label":"M", "x":9.75, "y":3}, {"label":"<", "x":10.75, "y":3}, {"label":">", "x":11.75, "y":3}, {"label":"?", "x":12.75, "y":3}, {"label":"Shift", "x":13.75, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2.25}, {"x":7.75, "y":4, "w":2.75}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":12.75, "y":4, "w":1.25}, {"label":"Menu", "x":14, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.25, "y":4, "w":1.25}]
|
||||
},
|
||||
"LAYOUT_split_bs_rshift": {
|
||||
"layout":[{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":8.5, "y":0}, {"label":"*", "x":9.5, "y":0}, {"label":"(", "x":10.5, "y":0}, {"label":")", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"Del", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":8, "y":1}, {"label":"U", "x":9, "y":1}, {"label":"I", "x":10, "y":1}, {"label":"O", "x":11, "y":1}, {"label":"P", "x":12, "y":1}, {"label":"{", "x":13, "y":1}, {"label":"}", "x":14, "y":1}, {"label":"|", "x":15, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":8.25, "y":2}, {"label":"J", "x":9.25, "y":2}, {"label":"K", "x":10.25, "y":2}, {"label":"L", "x":11.25, "y":2}, {"label":":", "x":12.25, "y":2}, {"label":"\"", "x":13.25, "y":2}, {"label":"Enter", "x":14.25, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":8.75, "y":3}, {"label":"M", "x":9.75, "y":3}, {"label":"<", "x":10.75, "y":3}, {"label":">", "x":11.75, "y":3}, {"label":"?", "x":12.75, "y":3}, {"label":"Shift", "x":13.75, "y":3, "w":1.75}, {"label":"Fn", "x":15.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2.25}, {"x":7.75, "y":4, "w":2.75}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":12.75, "y":4, "w":1.25}, {"label":"Menu", "x":14, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.25, "y":4, "w":1.25}]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2021 Swiftrax <swiftrax@gmail.com>
|
||||
|
||||
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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_split_bs_rshift(
|
||||
KC_ESC, 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_DEL,
|
||||
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_RBRC, KC_BSLS,
|
||||
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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL
|
||||
),
|
||||
[1] = LAYOUT_split_bs_rshift(
|
||||
RESET, 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_DEL, KC_BSPC,
|
||||
_______, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______,
|
||||
_______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
48
keyboards/handwired/swiftrax/equator/keymaps/via/keymap.c
Normal file
48
keyboards/handwired/swiftrax/equator/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright 2020 Swiftrax <swiftrax@gmail.com>
|
||||
|
||||
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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_split_bs_rshift(
|
||||
KC_ESC, 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_DEL,
|
||||
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_RBRC, KC_BSLS,
|
||||
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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL
|
||||
),
|
||||
[1] = LAYOUT_split_bs_rshift(
|
||||
RESET, 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_DEL, KC_BSPC,
|
||||
_______, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______,
|
||||
_______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[2] = LAYOUT_split_bs_rshift(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[3] = LAYOUT_split_bs_rshift(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
13
keyboards/handwired/swiftrax/equator/readme.md
Normal file
13
keyboards/handwired/swiftrax/equator/readme.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Equator
|
||||
|
||||
Meridian Layout Keyboard
|
||||
|
||||
* Keyboard Maintainer: Swiftrax
|
||||
* Hardware Supported: Equator
|
||||
* Hardware Availability: https://github.com/swiftrax
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make handwired/swiftrax/equator:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
22
keyboards/handwired/swiftrax/equator/rules.mk
Normal file
22
keyboards/handwired/swiftrax/equator/rules.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
@@ -14,6 +14,9 @@
|
||||
#include <print.h>
|
||||
#endif
|
||||
|
||||
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
#define kc5(a,b,c,d,e) KC_##a, KC_##b, KC_##c, KC_##d, KC_##e
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
@@ -46,43 +49,33 @@ enum custom_keycodes {
|
||||
EUCALYN,
|
||||
NUML,
|
||||
NUMR,
|
||||
KC_xEISU,
|
||||
KC_xKANA,
|
||||
KC_ZERO2,
|
||||
xEISU,
|
||||
xKANA,
|
||||
ZERO2,
|
||||
RGBRST
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
|
||||
//Macros
|
||||
#define KC_LOWER MO(_LOWER)
|
||||
#define KC_NUML LT(_NUML,KC_SPC)
|
||||
#define KC_NUMR LT(_NUMR,KC_SPC)
|
||||
#define KC_RABS LT(_RAISE,KC_BSPC)
|
||||
#define KC_RAEN LT(_RAISE,KC_ENT)
|
||||
#define KC_____ _______
|
||||
#define KC_XXXX XXXXXXX
|
||||
#define KC_ADJ MO(_ADJUST)
|
||||
#define KC_LSMI LSFT(KC_MINS)
|
||||
#define KC_LSEQ LSFT(KC_EQL)
|
||||
#define KC_LSRB LSFT(KC_RBRC)
|
||||
#define KC_LSLB LSFT(KC_LBRC)
|
||||
#define KC_LSGR LSFT(KC_GRV)
|
||||
#define KC_LSQT LSFT(KC_QUOT)
|
||||
#define LT_NUML_SP LT(_NUML,KC_SPC)
|
||||
#define LT_NUMR_SP LT(_NUMR,KC_SPC)
|
||||
#define LT_RA_BSPC LT(_RAISE,KC_BSPC)
|
||||
#define LT_RA_ENT LT(_RAISE,KC_ENT)
|
||||
#define ___ _______
|
||||
#define KC_S0 LSFT(KC_0)
|
||||
#define KC_S1 LSFT(KC_1)
|
||||
#define KC_S2 LSFT(KC_2)
|
||||
#define KC_S3 LSFT(KC_3)
|
||||
#define KC_S4 LSFT(KC_4)
|
||||
#define KC_S5 LSFT(KC_5)
|
||||
#define KC_S6 LSFT(KC_6)
|
||||
#define KC_S7 LSFT(KC_7)
|
||||
#define KC_S8 LSFT(KC_8)
|
||||
#define KC_S9 LSFT(KC_9)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
/* Qwerty */
|
||||
#define Q_____W_____E_____R_____T kc5( Q, W, E, R, T )
|
||||
#define Y_____U_____I_____O_____P kc5( Y, U, I, O, P )
|
||||
#define A_____S_____D_____F_____G kc5( A, S, D, F, G )
|
||||
#define H_____J_____K_____L__SCLN kc5( H, J, K, L, SCLN )
|
||||
#define Z_____X_____C_____V_____B kc5( Z, X, C, V, B )
|
||||
#define N_____M__COMM___DOT__SLSH kc5( N, M, COMM, DOT, SLSH )
|
||||
#define LOWER___LOWER__CAPS__LALT__LGUI__NUML__RABS MO(_LOWER), MO(_LOWER), KC_CAPS, KC_LALT, KC_LGUI, LT_NUML_SP, LT_RA_BSPC
|
||||
#define RAEN_NUMR__RGUI__RALT___APP_LOWER__LOWER LT_RA_ENT, LT_NUMR_SP, KC_RGUI, KC_RALT, KC_APP, MO(_LOWER), MO(_LOWER)
|
||||
/* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | S | D | F | G | | H | J | K | L | ; | Ctrl |
|
||||
@@ -92,15 +85,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_kc( \
|
||||
ESC, Q, W, E, R, T, Y, U, I, O, P, BSLS, \
|
||||
LCTL, A, S, D, F, G, H, J, K, L, SCLN, RCTL, \
|
||||
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, \
|
||||
LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \
|
||||
),
|
||||
[_QWERTY] = LAYOUT_wrapper(
|
||||
KC_ESC, Q_____W_____E_____R_____T, Y_____U_____I_____O_____P, KC_BSLS,
|
||||
KC_LCTL, A_____S_____D_____F_____G, H_____J_____K_____L__SCLN, KC_RCTL,
|
||||
KC_LSFT, Z_____X_____C_____V_____B, N_____M__COMM___DOT__SLSH, KC_RSFT,
|
||||
LOWER___LOWER__CAPS__LALT__LGUI__NUML__RABS, RAEN_NUMR__RGUI__RALT___APP_LOWER__LOWER
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
/* Colemak */
|
||||
#define Q_____W_____F_____P_____G kc5( Q, W, F, P, G )
|
||||
#define J_____L_____U_____Y__SCLN kc5( J, L, U, Y, SCLN )
|
||||
#define A_____R_____S_____T_____D kc5( A, R, S, T, D )
|
||||
#define H_____N_____E_____I_____O kc5( H, N, E, I, O )
|
||||
#define K_____M__COMM___DOT__SLSH kc5( K, M, COMM, DOT, SLSH )
|
||||
/* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ESC | Q | W | F | P | G | | J | L | U | Y | ; | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | R | S | T | D | | H | N | E | I | O | Ctrl |
|
||||
@@ -110,15 +108,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT_kc( \
|
||||
ESC, Q, W, F, P, G, J, L, U, Y, SCLN, BSLS, \
|
||||
LCTL, A, R, S, T, D, H, N, E, I, O, RCTL, \
|
||||
LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, RSFT, \
|
||||
LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \
|
||||
),
|
||||
[_COLEMAK] = LAYOUT_wrapper(
|
||||
KC_ESC, Q_____W_____F_____P_____G, J_____L_____U_____Y__SCLN, KC_BSLS,
|
||||
KC_LCTL, A_____R_____S_____T_____D, H_____N_____E_____I_____O, KC_RCTL,
|
||||
KC_LSFT, Z_____X_____C_____V_____B, K_____M__COMM___DOT__SLSH, KC_RSFT,
|
||||
LOWER___LOWER__CAPS__LALT__LGUI__NUML__RABS, RAEN_NUMR__RGUI__RALT___APP_LOWER__LOWER
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
/* Dvorak */
|
||||
#define QUOT__COMM___DOT_____P_____Y kc5( QUOT, COMM, DOT, P, Y )
|
||||
#define F_____G_____C_____R_____L kc5( F, G, C, R, L )
|
||||
#define A_____O_____E_____U_____I kc5( A, O, E, U, I )
|
||||
#define D_____H_____T_____N_____S kc5( D, H, T, N, S )
|
||||
#define SCLN_____Q_____J_____K_____X kc5( SCLN, Q, J, K, X )
|
||||
#define B_____M_____W_____V_____Z kc5( B, M, W, V, Z )
|
||||
/* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ESC | ' | , | . | P | Y | | F | G | C | R | L | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | O | E | U | I | | D | H | T | N | S | Ctrl |
|
||||
@@ -128,15 +132,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT_kc( \
|
||||
ESC, QUOT, COMM, DOT, P, Y, F, G, C, R, L, BSLS, \
|
||||
LCTL, A, O, E, U, I, D, H, T, N, S, RCTL, \
|
||||
LSFT, SCLN, Q, J, K, X, B, M, W, V, Z, RSFT, \
|
||||
LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \
|
||||
),
|
||||
[_DVORAK] = LAYOUT_wrapper(
|
||||
KC_ESC, QUOT__COMM___DOT_____P_____Y, F_____G_____C_____R_____L, KC_BSLS,
|
||||
KC_LCTL, A_____O_____E_____U_____I, D_____H_____T_____N_____S, KC_RCTL,
|
||||
KC_LSFT, SCLN_____Q_____J_____K_____X, B_____M_____W_____V_____Z, KC_RSFT,
|
||||
LOWER___LOWER__CAPS__LALT__LGUI__NUML__RABS, RAEN_NUMR__RGUI__RALT___APP_LOWER__LOWER
|
||||
),
|
||||
|
||||
/* Eucalyn (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout)
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
/* Eucalyn (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout) */
|
||||
#define Q_____W__COMM___DOT__SCLN kc5( Q, W, COMM, DOT, SCLN )
|
||||
#define M_____R_____D_____Y_____P kc5( M, R, D, Y, P )
|
||||
#define A_____O_____E_____I_____U kc5( A, O, E, I, U )
|
||||
#define G_____T_____K_____S_____N kc5( G, T, K, S, N )
|
||||
#define Z_____X_____C_____V_____F kc5( Z, X, C, V, F )
|
||||
#define B_____H_____J_____L__SLSH kc5( B, H, J, L, SLSH )
|
||||
/* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ESC | Q | W | , | . | ; | | M | R | D | Y | P | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | O | E | I | U | | G | T | K | S | N | Ctrl |
|
||||
@@ -146,15 +156,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_EUCALYN] = LAYOUT_kc( \
|
||||
ESC, Q, W, COMM, DOT, SCLN, M, R, D, Y, P, BSLS, \
|
||||
LCTL, A, O, E, I, U, G, T, K, S, N, RCTL, \
|
||||
LSFT, Z, X, C, V, F, B, H, J, L, SLSH, RSFT, \
|
||||
LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \
|
||||
),
|
||||
[_EUCALYN] = LAYOUT_wrapper(
|
||||
KC_ESC, Q_____W__COMM___DOT__SCLN, M_____R_____D_____Y_____P, KC_BSLS,
|
||||
KC_LCTL, A_____O_____E_____I_____U, G_____T_____K_____S_____N, KC_RCTL,
|
||||
KC_LSFT, Z_____X_____C_____V_____F, B_____H_____J_____L__SLSH, KC_RSFT,
|
||||
LOWER___LOWER__CAPS__LALT__LGUI__NUML__RABS, RAEN_NUMR__RGUI__RALT___APP_LOWER__LOWER
|
||||
),
|
||||
|
||||
/* Num
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
/* Num */
|
||||
#define EXLM__AT__HASH___DLR__PERC kc5( EXLM, AT, HASH, DLR, PERC )
|
||||
#define CIRC_AMPR_ASTR__LPRN__RPRN kc5( CIRC, AMPR, ASTR, LPRN, RPRN )
|
||||
#define _1_____2_____3_____4_____5 kc5( 1, 2, 3, 4, 5 )
|
||||
#define _6_____7_____8_____9_____0 kc5( 6, 7, 8, 9, 0 )
|
||||
#define F1____F2____F3____F4____F5 kc5( F1, F2, F3, F4, F5 )
|
||||
#define F6____F7____F8____F9___F10 kc5( F6, F7, F8, F9, F10 )
|
||||
#define ____z_____z_____z_____z _______, _______, _______, _______
|
||||
#define ____z_____z_____z _______, _______, _______
|
||||
#define ____z_____z _______, _______
|
||||
/* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
|
||||
@@ -164,40 +183,53 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUML] = LAYOUT_kc( \
|
||||
____, S1, S2, S3, S4, S5, S6, S7, S8, S9, S0, ____, \
|
||||
____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, F12, \
|
||||
____, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, \
|
||||
____, ____, ____, ____, ____, ____, ____, ____, SPC, ____, ____, ____, ____, ____ \
|
||||
),
|
||||
|
||||
[_NUMR] = LAYOUT_kc( \
|
||||
____, S1, S2, S3, S4, S5, S6, S7, S8, S9, S0, ____, \
|
||||
____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, F12, \
|
||||
____, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, \
|
||||
____, ____, ____, ____, ____, SPC, ____, ____, ____, ____, ____, ____, ____, ____ \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
[_NUML] = LAYOUT_wrapper(
|
||||
_______, EXLM__AT__HASH___DLR__PERC, CIRC_AMPR_ASTR__LPRN__RPRN, _______,
|
||||
_______, _1_____2_____3_____4_____5, _6_____7_____8_____9_____0, KC_F12,
|
||||
_______, F1____F2____F3____F4____F5, F6____F7____F8____F9___F10, KC_F11,
|
||||
_______, ____z_____z_____z_____z,____z_____z_____z,KC_SPC, ____z_____z_____z_____z, _______
|
||||
),
|
||||
[_NUMR] = LAYOUT_wrapper(
|
||||
_______, EXLM__AT__HASH___DLR__PERC, CIRC_AMPR_ASTR__LPRN__RPRN, _______,
|
||||
_______, _1_____2_____3_____4_____5, _6_____7_____8_____9_____0, KC_F12,
|
||||
_______, F1____F2____F3____F4____F5, F6____F7____F8____F9___F10, KC_F11,
|
||||
_______, ____z_____z_____z_____z,KC_SPC, ____z_____z_____z,____z_____z_____z_____z, _______
|
||||
),
|
||||
/* Lower */
|
||||
#define XXXX__PAUS__SLCK___INS__XXXX XXXXXXX, KC_PAUS, KC_SLCK, KC_INS, XXXXXXX
|
||||
#define XXXX___INS__SLCK__PAUS__XXXX XXXXXXX, KC_INS, KC_SLCK, KC_PAUS, XXXXXXX
|
||||
#define HOME__XXXX____UP___DEL__PGUP KC_HOME, XXXXXXX, KC_UP, KC_DEL, KC_PGUP
|
||||
#define PGUP___DEL____UP__XXXX__HOME KC_PGUP, KC_DEL, KC_UP, XXXXXXX, KC_HOME
|
||||
#define END___LEFT__DOWN__RGHT__PGDN kc5( END, LEFT, DOWN, RGHT, PGDN )
|
||||
#define PGDN__LEFT__DOWN__RGHT___END kc5( PGDN, LEFT, DOWN, RGHT, END )
|
||||
#define ______PSCR__________________ _______, KC_PSCR, _______, _______, _______
|
||||
#define __________________PSCR______ _______, _______, _______, KC_PSCR, _______
|
||||
#define ADJ___ADJ MO(_ADJUST), MO(_ADJUST)
|
||||
/* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | |Pause | ScrLk| Ins | | | | Ins | ScrLk|Pause | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | PgUp | | Up |Delete| Home | | Home |Delete| Up | | PgUp | |
|
||||
* | | Home | | Up |Delete| PgUp | | PgUp |Delete| Up | | Home | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | PgDn | Left | Down | Right| End | | End | Left | Down | Right| PgDn | |
|
||||
* | | End | Left | Down | Right| PgDn | | PgDn | Left | Down | Right| End | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | PrtSc| | | |Adjust|Adjust| | | | PrtSc| | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_kc( \
|
||||
XXXX, XXXX, PAUS, SLCK, INS, XXXX, XXXX, INS, SLCK, PAUS, XXXX, ____, \
|
||||
____, HOME, XXXX, UP, DEL, PGUP, PGUP, DEL, UP, XXXX, HOME, ____, \
|
||||
____, END, LEFT, DOWN, RGHT, PGDN, PGDN, LEFT, DOWN, RGHT, END, ____, \
|
||||
____, ____, PSCR, ____, ____, ____, ADJ, ADJ, ____, ____, ____, PSCR, ____, ____ \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
[_LOWER] = LAYOUT_wrapper(
|
||||
XXXXXXX, XXXX__PAUS__SLCK___INS__XXXX, XXXX___INS__SLCK__PAUS__XXXX, _______,
|
||||
_______, HOME__XXXX____UP___DEL__PGUP, PGUP___DEL____UP__XXXX__HOME, _______,
|
||||
_______, END___LEFT__DOWN__RGHT__PGDN, PGDN__LEFT__DOWN__RGHT___END, _______,
|
||||
_______, ______PSCR__________________, ADJ___ADJ, __________________PSCR______, _______
|
||||
),
|
||||
/* Raise */
|
||||
#define XXXX__XXXX__XXXX__UNDS__MINS XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_MINS
|
||||
#define EQL__PLUS__XXXX__XXXX__XXXX KC_EQL, KC_PLUS, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
#define XXXX__XXXX__XXXX__LCBR__LBRC XXXXXXX, XXXXXXX, XXXXXXX, KC_LCBR, KC_LBRC
|
||||
#define RBRC__RCBR__XXXX__XXXX__XXXX KC_RBRC, KC_RCBR, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
#define XXXX__XXXX__XXXX__TILD___GRV XXXXXXX, XXXXXXX, XXXXXXX, KC_TILD, KC_GRV
|
||||
#define QUOT___DQT__XXXX__XXXX__XXXX KC_QUOT, KC_DQT, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
#define XXXX______________XXXX XXXXXXX, _______, _______, XXXXXXX
|
||||
/* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | TAB | | | | _ | - | | = | + | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | EISU | | | | { | [ | | ] | } | | | | KANA |
|
||||
@@ -207,13 +239,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_kc( \
|
||||
TAB, XXXX, XXXX, XXXX, LSMI, MINS, EQL, LSEQ, XXXX, XXXX, XXXX, XXXX, \
|
||||
xEISU, XXXX, XXXX, XXXX, LSLB, LBRC, RBRC, LSRB, XXXX, XXXX, XXXX, xKANA, \
|
||||
XXXX, XXXX, XXXX, XXXX, LSGR, GRV, QUOT, LSQT, XXXX, XXXX, XXXX, XXXX, \
|
||||
ADJ, ADJ, XXXX, ____, ____, XXXX, ____, ____, XXXX, ____, ____, XXXX, ADJ, ADJ \
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_wrapper(
|
||||
KC_TAB, XXXX__XXXX__XXXX__UNDS__MINS, EQL__PLUS__XXXX__XXXX__XXXX, XXXXXXX,
|
||||
xEISU, XXXX__XXXX__XXXX__LCBR__LBRC, RBRC__RCBR__XXXX__XXXX__XXXX, xKANA,
|
||||
XXXXXXX, XXXX__XXXX__XXXX__TILD___GRV, QUOT___DQT__XXXX__XXXX__XXXX, XXXXXXX,
|
||||
ADJ___ADJ, XXXX______________XXXX, ____z_____z, XXXX______________XXXX, ADJ___ADJ
|
||||
),
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | Reset|RGBRST|RGB ON|Aud on| Win | | Win | |Qwerty|Euclyn|Colemk|Dvorak|
|
||||
@@ -226,10 +257,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT( \
|
||||
XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, XXXXXXX, QWERTY, EUCALYN, COLEMAK, DVORAK, \
|
||||
RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, AU_OFF, AG_NORM, AG_NORM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \
|
||||
XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, XXXXXXX, QWERTY, EUCALYN, COLEMAK, DVORAK, \
|
||||
RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, AU_OFF, AG_NORM, AG_NORM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \
|
||||
)
|
||||
};
|
||||
|
||||
@@ -302,7 +333,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_xEISU:
|
||||
case xEISU:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_LANG2);
|
||||
@@ -314,7 +345,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_xKANA:
|
||||
case xKANA:
|
||||
if (record->event.pressed) {
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
register_code(KC_LANG1);
|
||||
|
||||
150
keyboards/k_type/i2c_master.c
Normal file
150
keyboards/k_type/i2c_master.c
Normal file
@@ -0,0 +1,150 @@
|
||||
/* Copyright 2018 Jack Humbert
|
||||
* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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 library is only valid for STM32 processors.
|
||||
* This library follows the convention of the AVR i2c_master library.
|
||||
* As a result addresses are expected to be already shifted (addr << 1).
|
||||
* I2CD1 is the default driver which corresponds to pins B6 and B7. This
|
||||
* can be changed.
|
||||
* Please ensure that HAL_USE_I2C is TRUE in the halconf.h file and that
|
||||
* STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file. Pins B6 and B7 are used
|
||||
* but using any other I2C pins should be trivial.
|
||||
*/
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
|
||||
#include "quantum.h"
|
||||
#include "i2c_master.h"
|
||||
#include <string.h>
|
||||
#include <hal.h>
|
||||
|
||||
static uint8_t i2c_address;
|
||||
|
||||
I2CDriver *drivers[I2C_COUNT];
|
||||
|
||||
static const I2CConfig i2cconfig = {
|
||||
#if defined(USE_I2CV1_CONTRIB)
|
||||
I2C1_CLOCK_SPEED,
|
||||
#elif defined(USE_I2CV1)
|
||||
I2C1_OPMODE,
|
||||
I2C1_CLOCK_SPEED,
|
||||
I2C1_DUTY_CYCLE,
|
||||
#else
|
||||
// This configures the I2C clock to 400khz assuming a 72Mhz clock
|
||||
// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html
|
||||
STM32_TIMINGR_PRESC(I2C1_TIMINGR_PRESC) | STM32_TIMINGR_SCLDEL(I2C1_TIMINGR_SCLDEL) | STM32_TIMINGR_SDADEL(I2C1_TIMINGR_SDADEL) | STM32_TIMINGR_SCLH(I2C1_TIMINGR_SCLH) | STM32_TIMINGR_SCLL(I2C1_TIMINGR_SCLL), 0, 0
|
||||
#endif
|
||||
};
|
||||
|
||||
static i2c_status_t chibios_to_qmk(const msg_t* status) {
|
||||
switch (*status) {
|
||||
case I2C_NO_ERROR:
|
||||
return I2C_STATUS_SUCCESS;
|
||||
case I2C_TIMEOUT:
|
||||
return I2C_STATUS_TIMEOUT;
|
||||
// I2C_BUS_ERROR, I2C_ARBITRATION_LOST, I2C_ACK_FAILURE, I2C_OVERRUN, I2C_PEC_ERROR, I2C_SMB_ALERT
|
||||
default:
|
||||
return I2C_STATUS_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) void i2c_init(I2CDriver *driver, ioportid_t scl_port, ioportid_t sda_port, iopadid_t scl_pad, iopadid_t sda_pad) {
|
||||
static uint8_t index = 0;
|
||||
if (index < I2C_COUNT) {
|
||||
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(scl_port, scl_pad, PAL_MODE_INPUT);
|
||||
palSetPadMode(sda_port, sda_pad, PAL_MODE_INPUT);
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
|
||||
#if defined(USE_GPIOV1)
|
||||
palSetPadMode(scl_port, scl_pad, I2C1_SCL_PAL_MODE);
|
||||
palSetPadMode(sda_port, sda_pad, I2C1_SDA_PAL_MODE);
|
||||
#else
|
||||
palSetPadMode(scl_port, scl_pad, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
palSetPadMode(sda_port, sda_pad, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
#endif
|
||||
|
||||
drivers[index++] = driver;
|
||||
}
|
||||
}
|
||||
|
||||
i2c_status_t i2c_start(uint8_t index, uint8_t address) {
|
||||
if(index >= I2C_COUNT) {
|
||||
return I2C_STATUS_ERROR;
|
||||
}
|
||||
i2c_address = address;
|
||||
i2cStart(drivers[index], &i2cconfig);
|
||||
return I2C_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
i2c_status_t i2c_transmit(uint8_t index, uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||
if(index >= I2C_COUNT) {
|
||||
return I2C_STATUS_ERROR;
|
||||
}
|
||||
i2c_address = address;
|
||||
i2cStart(drivers[index], &i2cconfig);
|
||||
msg_t status = i2cMasterTransmitTimeout(drivers[index], (i2c_address >> 1), data, length, 0, 0, TIME_MS2I(timeout));
|
||||
return chibios_to_qmk(&status);
|
||||
}
|
||||
|
||||
i2c_status_t i2c_receive(uint8_t index, uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||
if(index >= I2C_COUNT) {
|
||||
return I2C_STATUS_ERROR;
|
||||
}
|
||||
i2c_address = address;
|
||||
i2cStart(drivers[index], &i2cconfig);
|
||||
msg_t status = i2cMasterReceiveTimeout(drivers[index], (i2c_address >> 1), data, length, TIME_MS2I(timeout));
|
||||
return chibios_to_qmk(&status);
|
||||
}
|
||||
|
||||
i2c_status_t i2c_writeReg(uint8_t index, uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||
if(index >= I2C_COUNT) {
|
||||
return I2C_STATUS_ERROR;
|
||||
}
|
||||
i2c_address = devaddr;
|
||||
i2cStart(drivers[index], &i2cconfig);
|
||||
|
||||
uint8_t complete_packet[length + 1];
|
||||
for (uint8_t i = 0; i < length; i++) {
|
||||
complete_packet[i + 1] = data[i];
|
||||
}
|
||||
complete_packet[0] = regaddr;
|
||||
|
||||
msg_t status = i2cMasterTransmitTimeout(drivers[index], (i2c_address >> 1), complete_packet, length + 1, 0, 0, TIME_MS2I(timeout));
|
||||
return chibios_to_qmk(&status);
|
||||
}
|
||||
|
||||
i2c_status_t i2c_readReg(uint8_t index, uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||
if(index >= I2C_COUNT) {
|
||||
return I2C_STATUS_ERROR;
|
||||
}
|
||||
i2c_address = devaddr;
|
||||
i2cStart(drivers[index], &i2cconfig);
|
||||
msg_t status = i2cMasterTransmitTimeout(drivers[index], (i2c_address >> 1), ®addr, 1, data, length, TIME_MS2I(timeout));
|
||||
return chibios_to_qmk(&status);
|
||||
}
|
||||
|
||||
void i2c_stop(uint8_t index) {
|
||||
if(index < I2C_COUNT) {
|
||||
i2cStop(drivers[index]);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
127
keyboards/k_type/i2c_master.h
Normal file
127
keyboards/k_type/i2c_master.h
Normal file
@@ -0,0 +1,127 @@
|
||||
/* Copyright 2018 Jack Humbert
|
||||
* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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 library follows the convention of the AVR i2c_master library.
|
||||
* As a result addresses are expected to be already shifted (addr << 1).
|
||||
* I2CD1 is the default driver which corresponds to pins B6 and B7. This
|
||||
* can be changed.
|
||||
* Please ensure that HAL_USE_I2C is TRUE in the halconf.h file and that
|
||||
* STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <ch.h>
|
||||
#include <hal.h>
|
||||
|
||||
#ifndef I2C_COUNT
|
||||
# define I2C_COUNT 1
|
||||
#endif
|
||||
|
||||
#ifdef I2C1_BANK
|
||||
# define I2C1_SCL_BANK I2C1_BANK
|
||||
# define I2C1_SDA_BANK I2C1_BANK
|
||||
#endif
|
||||
|
||||
#ifndef I2C1_SCL_BANK
|
||||
# define I2C1_SCL_BANK GPIOB
|
||||
#endif
|
||||
|
||||
#ifndef I2C1_SDA_BANK
|
||||
# define I2C1_SDA_BANK GPIOB
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef USE_I2C2
|
||||
# ifdef I2C2_BANK
|
||||
# define I2C2_SCL_BANK I2C2_BANK
|
||||
# define I2C2_SDA_BANK I2C2_BANK
|
||||
# endif
|
||||
# ifndef I2C2_SCL_BANK
|
||||
# define I2C2_SCL_BANK GPIOC
|
||||
# endif
|
||||
# ifndef I2C2_SDA_BANK
|
||||
# define I2C2_SDA_BANK GPIOC
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef I2C1_SCL
|
||||
# define I2C1_SCL 6
|
||||
#endif
|
||||
#ifndef I2C1_SDA
|
||||
# define I2C1_SDA 7
|
||||
#endif
|
||||
|
||||
#ifdef USE_I2CV1
|
||||
# ifndef I2C1_OPMODE
|
||||
# define I2C1_OPMODE OPMODE_I2C
|
||||
# endif
|
||||
# ifndef I2C1_CLOCK_SPEED
|
||||
# define I2C1_CLOCK_SPEED 100000 /* 400000 */
|
||||
# endif
|
||||
# ifndef I2C1_DUTY_CYCLE
|
||||
# define I2C1_DUTY_CYCLE STD_DUTY_CYCLE /* FAST_DUTY_CYCLE_2 */
|
||||
# endif
|
||||
#else
|
||||
// The default timing values below configures the I2C clock to 400khz assuming a 72Mhz clock
|
||||
// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html
|
||||
# ifndef I2C1_TIMINGR_PRESC
|
||||
# define I2C1_TIMINGR_PRESC 0U
|
||||
# endif
|
||||
# ifndef I2C1_TIMINGR_SCLDEL
|
||||
# define I2C1_TIMINGR_SCLDEL 7U
|
||||
# endif
|
||||
# ifndef I2C1_TIMINGR_SDADEL
|
||||
# define I2C1_TIMINGR_SDADEL 0U
|
||||
# endif
|
||||
# ifndef I2C1_TIMINGR_SCLH
|
||||
# define I2C1_TIMINGR_SCLH 38U
|
||||
# endif
|
||||
# ifndef I2C1_TIMINGR_SCLL
|
||||
# define I2C1_TIMINGR_SCLL 129U
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_GPIOV1
|
||||
# ifndef I2C1_SCL_PAL_MODE
|
||||
# define I2C1_SCL_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
|
||||
# endif
|
||||
# ifndef I2C1_SDA_PAL_MODE
|
||||
# define I2C1_SDA_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
|
||||
# endif
|
||||
#else
|
||||
// The default PAL alternate modes are used to signal that the pins are used for I2C
|
||||
# ifndef I2C1_SCL_PAL_MODE
|
||||
# define I2C1_SCL_PAL_MODE 4
|
||||
# endif
|
||||
# ifndef I2C1_SDA_PAL_MODE
|
||||
# define I2C1_SDA_PAL_MODE 4
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef int16_t i2c_status_t;
|
||||
|
||||
#define I2C_STATUS_SUCCESS (0)
|
||||
#define I2C_STATUS_ERROR (-1)
|
||||
#define I2C_STATUS_TIMEOUT (-2)
|
||||
|
||||
void i2c_init(I2CDriver *driver, ioportid_t scl_port, ioportid_t sda_port, iopadid_t scl_pad, iopadid_t sda_pad);
|
||||
i2c_status_t i2c_start(uint8_t index, uint8_t address);
|
||||
i2c_status_t i2c_transmit(uint8_t index, uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
i2c_status_t i2c_receive(uint8_t index, uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
i2c_status_t i2c_writeReg(uint8_t index, uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
i2c_status_t i2c_readReg(uint8_t index, uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
void i2c_stop(uint8_t index);
|
||||
236
keyboards/k_type/is31fl3733-dual.c
Normal file
236
keyboards/k_type/is31fl3733-dual.c
Normal file
@@ -0,0 +1,236 @@
|
||||
/* Copyright 2017 Jason Williams
|
||||
* Copyright 2018 Jack Humbert
|
||||
* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
#include "is31fl3733-dual.h"
|
||||
#include "i2c_master.h"
|
||||
#include "wait.h"
|
||||
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||
// The address will vary depending on your wiring:
|
||||
// 00 <-> GND
|
||||
// 01 <-> SCL
|
||||
// 10 <-> SDA
|
||||
// 11 <-> VCC
|
||||
// ADDR1 represents A1:A0 of the 7-bit address.
|
||||
// ADDR2 represents A3:A2 of the 7-bit address.
|
||||
// The result is: 0b101(ADDR2)(ADDR1)
|
||||
#define ISSI_ADDR_DEFAULT 0x50
|
||||
|
||||
#define ISSI_COMMANDREGISTER 0xFD
|
||||
#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE
|
||||
#define ISSI_INTERRUPTMASKREGISTER 0xF0
|
||||
#define ISSI_INTERRUPTSTATUSREGISTER 0xF1
|
||||
|
||||
#define ISSI_PAGE_LEDCONTROL 0x00 // PG0
|
||||
#define ISSI_PAGE_PWM 0x01 // PG1
|
||||
#define ISSI_PAGE_AUTOBREATH 0x02 // PG2
|
||||
#define ISSI_PAGE_FUNCTION 0x03 // PG3
|
||||
|
||||
#define ISSI_REG_CONFIGURATION 0x00 // PG3
|
||||
#define ISSI_REG_GLOBALCURRENT 0x01 // PG3
|
||||
#define ISSI_REG_RESET 0x11 // PG3
|
||||
#define ISSI_REG_SWPULLUP 0x0F // PG3
|
||||
#define ISSI_REG_CSPULLUP 0x10 // PG3
|
||||
|
||||
#ifndef ISSI_TIMEOUT
|
||||
# define ISSI_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef ISSI_PERSISTENCE
|
||||
# define ISSI_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
// Transfer buffer for TWITransmitData()
|
||||
uint8_t g_twi_transfer_buffer[20];
|
||||
|
||||
// These buffers match the IS31FL3733 PWM registers.
|
||||
// The control buffers match the PG0 LED On/Off registers.
|
||||
// Storing them like this is optimal for I2C transfers to the registers.
|
||||
// We could optimize this and take out the unused registers from these
|
||||
// buffers and the transfers in IS31FL3733_write_pwm_buffer() but it's
|
||||
// probably not worth the extra complexity.
|
||||
uint8_t g_pwm_buffer[DRIVER_COUNT][192];
|
||||
bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
|
||||
|
||||
uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}, {0}};
|
||||
bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
|
||||
|
||||
bool IS31FL3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t data) {
|
||||
// If the transaction fails function returns false.
|
||||
g_twi_transfer_buffer[0] = reg;
|
||||
g_twi_transfer_buffer[1] = data;
|
||||
|
||||
#if ISSI_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IS31FL3733_write_pwm_buffer(uint8_t index, uint8_t addr, uint8_t *pwm_buffer) {
|
||||
// Assumes PG1 is already selected.
|
||||
// If any of the transactions fails function returns false.
|
||||
// Transmit PWM registers in 12 transfers of 16 bytes.
|
||||
// g_twi_transfer_buffer[] is 20 bytes
|
||||
|
||||
// Iterate over the pwm_buffer contents at 16 byte intervals.
|
||||
for (int i = 0; i < 192; i += 16) {
|
||||
g_twi_transfer_buffer[0] = i;
|
||||
// Copy the data from i to i+15.
|
||||
// Device will auto-increment register for data after the first byte
|
||||
// Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
|
||||
for (int j = 0; j < 16; j++) {
|
||||
g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
|
||||
}
|
||||
|
||||
#if ISSI_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void IS31FL3733_init(uint8_t bus, uint8_t addr, uint8_t sync) {
|
||||
// In order to avoid the LEDs being driven with garbage data
|
||||
// in the LED driver's PWM registers, shutdown is enabled last.
|
||||
// Set up the mode and other settings, clear the PWM registers,
|
||||
// then disable software shutdown.
|
||||
// Sync is passed so set it according to the datasheet.
|
||||
|
||||
// Unlock the command register.
|
||||
IS31FL3733_write_register(bus, addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
// Select PG0
|
||||
IS31FL3733_write_register(bus, addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
||||
// Turn off all LEDs.
|
||||
for (int i = 0x00; i <= 0x17; i++) {
|
||||
IS31FL3733_write_register(bus, addr, i, 0x00);
|
||||
}
|
||||
// Unlock the command register.
|
||||
IS31FL3733_write_register(bus, addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
// Select PG1
|
||||
IS31FL3733_write_register(bus, addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
||||
// Set PWM on all LEDs to 0
|
||||
// No need to setup Breath registers to PWM as that is the default.
|
||||
for (int i = 0x00; i <= 0xBF; i++) {
|
||||
IS31FL3733_write_register(bus, addr, i, 0x00);
|
||||
}
|
||||
// Unlock the command register.
|
||||
IS31FL3733_write_register(bus, addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
// Select PG3
|
||||
IS31FL3733_write_register(bus, addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION);
|
||||
// Set global current to maximum.
|
||||
IS31FL3733_write_register(bus, addr, ISSI_REG_GLOBALCURRENT, 0xFF);
|
||||
// Disable software shutdown.
|
||||
IS31FL3733_write_register(bus, addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01);
|
||||
// Wait 10ms to ensure the device has woken up.
|
||||
wait_ms(10);
|
||||
}
|
||||
|
||||
void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
||||
is31_led led = g_is31_leds[index];
|
||||
|
||||
g_pwm_buffer[led.driver][led.r] = red;
|
||||
g_pwm_buffer[led.driver][led.g] = green;
|
||||
g_pwm_buffer[led.driver][led.b] = blue;
|
||||
g_pwm_buffer_update_required[led.driver] = true;
|
||||
}
|
||||
}
|
||||
|
||||
void IS31FL3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
IS31FL3733_set_color(i, red, green, blue);
|
||||
}
|
||||
}
|
||||
|
||||
void IS31FL3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
|
||||
is31_led led = g_is31_leds[index];
|
||||
|
||||
uint8_t control_register_r = led.r / 8;
|
||||
uint8_t control_register_g = led.g / 8;
|
||||
uint8_t control_register_b = led.b / 8;
|
||||
uint8_t bit_r = led.r % 8;
|
||||
uint8_t bit_g = led.g % 8;
|
||||
uint8_t bit_b = led.b % 8;
|
||||
|
||||
if (red) {
|
||||
g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r);
|
||||
} else {
|
||||
g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r);
|
||||
}
|
||||
if (green) {
|
||||
g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g);
|
||||
} else {
|
||||
g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g);
|
||||
}
|
||||
if (blue) {
|
||||
g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b);
|
||||
} else {
|
||||
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
|
||||
}
|
||||
|
||||
g_led_control_registers_update_required[led.driver] = true;
|
||||
}
|
||||
|
||||
void IS31FL3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
||||
if (g_pwm_buffer_update_required[index]) {
|
||||
// Firstly we need to unlock the command register and select PG1.
|
||||
IS31FL3733_write_register(index, addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
IS31FL3733_write_register(index, addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
||||
|
||||
// If any of the transactions fail we risk writing dirty PG0,
|
||||
// refresh page 0 just in case.
|
||||
if (!IS31FL3733_write_pwm_buffer(index, addr, g_pwm_buffer[index])) {
|
||||
g_led_control_registers_update_required[index] = true;
|
||||
}
|
||||
}
|
||||
g_pwm_buffer_update_required[index] = false;
|
||||
}
|
||||
|
||||
void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
if (g_led_control_registers_update_required[index]) {
|
||||
// Firstly we need to unlock the command register and select PG0
|
||||
IS31FL3733_write_register(index, addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
IS31FL3733_write_register(index, addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
||||
for (int i = 0; i < 24; i++) {
|
||||
IS31FL3733_write_register(index, addr, i, g_led_control_registers[index][i]);
|
||||
}
|
||||
}
|
||||
g_led_control_registers_update_required[index] = false;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
251
keyboards/k_type/is31fl3733-dual.h
Normal file
251
keyboards/k_type/is31fl3733-dual.h
Normal file
@@ -0,0 +1,251 @@
|
||||
/* Copyright 2017 Jason Williams
|
||||
* Copyright 2018 Jack Humbert
|
||||
* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct is31_led {
|
||||
uint8_t driver : 2;
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
} __attribute__((packed)) is31_led;
|
||||
|
||||
extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
|
||||
|
||||
void IS31FL3733_init(uint8_t bus, uint8_t addr, uint8_t sync);
|
||||
bool IS31FL3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t data);
|
||||
bool IS31FL3733_write_pwm_buffer(uint8_t index, uint8_t addr, uint8_t *pwm_buffer);
|
||||
|
||||
void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
|
||||
void IS31FL3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
void IS31FL3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue);
|
||||
|
||||
// This should not be called from an interrupt
|
||||
// (eg. from a timer interrupt).
|
||||
// Call this while idle (in between matrix scans).
|
||||
// If the buffer is dirty, it will update the driver with the buffer.
|
||||
void IS31FL3733_update_pwm_buffers(uint8_t addr, uint8_t index); // index is the driver index
|
||||
void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index);
|
||||
|
||||
#define A_1 0x00
|
||||
#define A_2 0x01
|
||||
#define A_3 0x02
|
||||
#define A_4 0x03
|
||||
#define A_5 0x04
|
||||
#define A_6 0x05
|
||||
#define A_7 0x06
|
||||
#define A_8 0x07
|
||||
#define A_9 0x08
|
||||
#define A_10 0x09
|
||||
#define A_11 0x0A
|
||||
#define A_12 0x0B
|
||||
#define A_13 0x0C
|
||||
#define A_14 0x0D
|
||||
#define A_15 0x0E
|
||||
#define A_16 0x0F
|
||||
|
||||
#define B_1 0x10
|
||||
#define B_2 0x11
|
||||
#define B_3 0x12
|
||||
#define B_4 0x13
|
||||
#define B_5 0x14
|
||||
#define B_6 0x15
|
||||
#define B_7 0x16
|
||||
#define B_8 0x17
|
||||
#define B_9 0x18
|
||||
#define B_10 0x19
|
||||
#define B_11 0x1A
|
||||
#define B_12 0x1B
|
||||
#define B_13 0x1C
|
||||
#define B_14 0x1D
|
||||
#define B_15 0x1E
|
||||
#define B_16 0x1F
|
||||
|
||||
#define C_1 0x20
|
||||
#define C_2 0x21
|
||||
#define C_3 0x22
|
||||
#define C_4 0x23
|
||||
#define C_5 0x24
|
||||
#define C_6 0x25
|
||||
#define C_7 0x26
|
||||
#define C_8 0x27
|
||||
#define C_9 0x28
|
||||
#define C_10 0x29
|
||||
#define C_11 0x2A
|
||||
#define C_12 0x2B
|
||||
#define C_13 0x2C
|
||||
#define C_14 0x2D
|
||||
#define C_15 0x2E
|
||||
#define C_16 0x2F
|
||||
|
||||
#define D_1 0x30
|
||||
#define D_2 0x31
|
||||
#define D_3 0x32
|
||||
#define D_4 0x33
|
||||
#define D_5 0x34
|
||||
#define D_6 0x35
|
||||
#define D_7 0x36
|
||||
#define D_8 0x37
|
||||
#define D_9 0x38
|
||||
#define D_10 0x39
|
||||
#define D_11 0x3A
|
||||
#define D_12 0x3B
|
||||
#define D_13 0x3C
|
||||
#define D_14 0x3D
|
||||
#define D_15 0x3E
|
||||
#define D_16 0x3F
|
||||
|
||||
#define E_1 0x40
|
||||
#define E_2 0x41
|
||||
#define E_3 0x42
|
||||
#define E_4 0x43
|
||||
#define E_5 0x44
|
||||
#define E_6 0x45
|
||||
#define E_7 0x46
|
||||
#define E_8 0x47
|
||||
#define E_9 0x48
|
||||
#define E_10 0x49
|
||||
#define E_11 0x4A
|
||||
#define E_12 0x4B
|
||||
#define E_13 0x4C
|
||||
#define E_14 0x4D
|
||||
#define E_15 0x4E
|
||||
#define E_16 0x4F
|
||||
|
||||
#define F_1 0x50
|
||||
#define F_2 0x51
|
||||
#define F_3 0x52
|
||||
#define F_4 0x53
|
||||
#define F_5 0x54
|
||||
#define F_6 0x55
|
||||
#define F_7 0x56
|
||||
#define F_8 0x57
|
||||
#define F_9 0x58
|
||||
#define F_10 0x59
|
||||
#define F_11 0x5A
|
||||
#define F_12 0x5B
|
||||
#define F_13 0x5C
|
||||
#define F_14 0x5D
|
||||
#define F_15 0x5E
|
||||
#define F_16 0x5F
|
||||
|
||||
#define G_1 0x60
|
||||
#define G_2 0x61
|
||||
#define G_3 0x62
|
||||
#define G_4 0x63
|
||||
#define G_5 0x64
|
||||
#define G_6 0x65
|
||||
#define G_7 0x66
|
||||
#define G_8 0x67
|
||||
#define G_9 0x68
|
||||
#define G_10 0x69
|
||||
#define G_11 0x6A
|
||||
#define G_12 0x6B
|
||||
#define G_13 0x6C
|
||||
#define G_14 0x6D
|
||||
#define G_15 0x6E
|
||||
#define G_16 0x6F
|
||||
|
||||
#define H_1 0x70
|
||||
#define H_2 0x71
|
||||
#define H_3 0x72
|
||||
#define H_4 0x73
|
||||
#define H_5 0x74
|
||||
#define H_6 0x75
|
||||
#define H_7 0x76
|
||||
#define H_8 0x77
|
||||
#define H_9 0x78
|
||||
#define H_10 0x79
|
||||
#define H_11 0x7A
|
||||
#define H_12 0x7B
|
||||
#define H_13 0x7C
|
||||
#define H_14 0x7D
|
||||
#define H_15 0x7E
|
||||
#define H_16 0x7F
|
||||
|
||||
#define I_1 0x80
|
||||
#define I_2 0x81
|
||||
#define I_3 0x82
|
||||
#define I_4 0x83
|
||||
#define I_5 0x84
|
||||
#define I_6 0x85
|
||||
#define I_7 0x86
|
||||
#define I_8 0x87
|
||||
#define I_9 0x88
|
||||
#define I_10 0x89
|
||||
#define I_11 0x8A
|
||||
#define I_12 0x8B
|
||||
#define I_13 0x8C
|
||||
#define I_14 0x8D
|
||||
#define I_15 0x8E
|
||||
#define I_16 0x8F
|
||||
|
||||
#define J_1 0x90
|
||||
#define J_2 0x91
|
||||
#define J_3 0x92
|
||||
#define J_4 0x93
|
||||
#define J_5 0x94
|
||||
#define J_6 0x95
|
||||
#define J_7 0x96
|
||||
#define J_8 0x97
|
||||
#define J_9 0x98
|
||||
#define J_10 0x99
|
||||
#define J_11 0x9A
|
||||
#define J_12 0x9B
|
||||
#define J_13 0x9C
|
||||
#define J_14 0x9D
|
||||
#define J_15 0x9E
|
||||
#define J_16 0x9F
|
||||
|
||||
#define K_1 0xA0
|
||||
#define K_2 0xA1
|
||||
#define K_3 0xA2
|
||||
#define K_4 0xA3
|
||||
#define K_5 0xA4
|
||||
#define K_6 0xA5
|
||||
#define K_7 0xA6
|
||||
#define K_8 0xA7
|
||||
#define K_9 0xA8
|
||||
#define K_10 0xA9
|
||||
#define K_11 0xAA
|
||||
#define K_12 0xAB
|
||||
#define K_13 0xAC
|
||||
#define K_14 0xAD
|
||||
#define K_15 0xAE
|
||||
#define K_16 0xAF
|
||||
|
||||
#define L_1 0xB0
|
||||
#define L_2 0xB1
|
||||
#define L_3 0xB2
|
||||
#define L_4 0xB3
|
||||
#define L_5 0xB4
|
||||
#define L_6 0xB5
|
||||
#define L_7 0xB6
|
||||
#define L_8 0xB7
|
||||
#define L_9 0xB8
|
||||
#define L_10 0xB9
|
||||
#define L_11 0xBA
|
||||
#define L_12 0xBB
|
||||
#define L_13 0xBC
|
||||
#define L_14 0xBD
|
||||
#define L_15 0xBE
|
||||
#define L_16 0xBF
|
||||
57
keyboards/k_type/k_type-rgbdriver.c
Normal file
57
keyboards/k_type/k_type-rgbdriver.c
Normal file
@@ -0,0 +1,57 @@
|
||||
/* Copyright 2021 Andrew Fahmy
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
#include "rgb_matrix.h"
|
||||
#include "i2c_master.h"
|
||||
#include "is31fl3733-dual.h"
|
||||
|
||||
|
||||
|
||||
static void init(void) {
|
||||
i2c_init(&I2CD1, I2C1_SCL_BANK, I2C1_SDA_BANK, I2C1_SCL, I2C1_SDA);
|
||||
IS31FL3733_init(0, DRIVER_ADDR_1, 0);
|
||||
# ifdef USE_I2C2
|
||||
i2c_init(&I2CD2, I2C2_SCL_BANK, I2C2_SDA_BANK, I2C2_SCL, I2C2_SDA);
|
||||
IS31FL3733_init(1, DRIVER_ADDR_2, 0);
|
||||
# endif
|
||||
for (int index = 0; index < DRIVER_LED_TOTAL; index++) {
|
||||
bool enabled = true;
|
||||
// This only caches it for later
|
||||
IS31FL3733_set_led_control_register(index, enabled, enabled, enabled);
|
||||
}
|
||||
IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0);
|
||||
# ifdef USE_I2C2
|
||||
IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1);
|
||||
# endif
|
||||
}
|
||||
|
||||
static void flush(void) {
|
||||
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0);
|
||||
# ifdef USE_I2C2
|
||||
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_2, 1);
|
||||
# endif
|
||||
}
|
||||
|
||||
const rgb_matrix_driver_t rgb_matrix_driver = {
|
||||
.init = init,
|
||||
.flush = flush,
|
||||
.set_color = IS31FL3733_set_color,
|
||||
.set_color_all = IS31FL3733_set_color_all,
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -17,7 +17,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "k_type.h"
|
||||
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
#include "is31fl3733-dual.h"
|
||||
|
||||
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{ 0, B_1, A_1, C_1 },
|
||||
{ 0, B_2, A_2, C_2 },
|
||||
@@ -45,11 +50,11 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{ 0, E_7, D_7, F_7 },
|
||||
{ 0, E_8, D_8, F_8 },
|
||||
{ 0, E_9, D_9, F_9 },
|
||||
{ 0, E_10, D_1, F_10 },
|
||||
{ 0, E_11, D_1, F_11 },
|
||||
{ 0, E_12, D_1, F_12 },
|
||||
{ 0, E_13, D_1, F_13 },
|
||||
{ 0, E_14, D_1, F_14 },
|
||||
{ 0, E_10, D_10, F_10 },
|
||||
{ 0, E_11, D_11, F_11 },
|
||||
{ 0, E_12, D_12, F_12 },
|
||||
{ 0, E_13, D_13, F_13 },
|
||||
{ 0, E_14, D_14, F_14 },
|
||||
{ 0, E_15, D_15, F_15 },
|
||||
{ 0, E_16, D_16, F_16 },
|
||||
|
||||
@@ -62,11 +67,11 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{ 0, H_7, G_7, I_7 },
|
||||
{ 0, H_8, G_8, I_8 },
|
||||
{ 0, H_9, G_9, I_9 },
|
||||
{ 0, H_10, G_1, I_10 },
|
||||
{ 0, H_11, G_1, I_11 },
|
||||
{ 0, H_12, G_1, I_12 },
|
||||
{ 0, H_13, G_1, I_13 },
|
||||
{ 0, H_14, G_1, I_14 },
|
||||
{ 0, H_10, G_10, I_10 },
|
||||
{ 0, H_11, G_11, I_11 },
|
||||
{ 0, H_12, G_12, I_12 },
|
||||
{ 0, H_13, G_13, I_13 },
|
||||
{ 0, H_14, G_14, I_14 },
|
||||
{ 0, H_15, G_15, I_15 },
|
||||
{ 0, H_16, G_16, I_16 },
|
||||
|
||||
@@ -79,106 +84,123 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{ 0, K_7, J_7, L_7 },
|
||||
{ 0, K_8, J_8, L_8 },
|
||||
{ 0, K_9, J_9, L_9 },
|
||||
{ 0, K_10, J_1, L_10 },
|
||||
{ 0, K_11, J_1, L_11 },
|
||||
{ 0, K_12, J_1, L_12 },
|
||||
{ 0, K_13, J_1, L_13 },
|
||||
{ 0, K_14, J_1, L_14 },
|
||||
{ 0, K_10, J_10, L_10 },
|
||||
{ 0, K_11, J_11, L_11 },
|
||||
{ 0, K_12, J_12, L_12 },
|
||||
{ 0, K_13, J_13, L_13 },
|
||||
{ 0, K_14, J_14, L_14 },
|
||||
{ 0, K_15, J_15, L_15 },
|
||||
{ 0, K_16, J_16, L_16 },
|
||||
|
||||
// Driver 2 is on I2C2 - currently not usable with i2c_master
|
||||
//{ 1, B_1, A_1, C_1 },
|
||||
//{ 1, B_2, A_2, C_2 },
|
||||
//{ 1, B_3, A_3, C_3 },
|
||||
//{ 1, B_4, A_4, C_4 },
|
||||
//{ 1, B_5, A_5, C_5 },
|
||||
//{ 1, B_6, A_6, C_6 },
|
||||
//{ 1, B_7, A_7, C_7 },
|
||||
//{ 1, B_8, A_8, C_8 },
|
||||
//{ 1, B_9, A_9, C_9 },
|
||||
//{ 1, B_10, A_10, C_10 },
|
||||
//{ 1, B_11, A_11, C_11 },
|
||||
//{ 1, B_12, A_12, C_12 },
|
||||
//{ 1, B_13, A_13, C_13 },
|
||||
//{ 1, B_14, A_14, C_14 },
|
||||
//{ 1, B_15, A_15, C_15 },
|
||||
//{ 1, B_16, A_16, C_16 },
|
||||
{ 1, B_1, A_1, C_1 },
|
||||
{ 1, B_2, A_2, C_2 },
|
||||
{ 1, B_3, A_3, C_3 },
|
||||
{ 1, B_4, A_4, C_4 },
|
||||
{ 1, B_5, A_5, C_5 },
|
||||
{ 1, B_6, A_6, C_6 },
|
||||
{ 1, B_7, A_7, C_7 },
|
||||
{ 1, B_8, A_8, C_8 },
|
||||
{ 1, B_9, A_9, C_9 },
|
||||
{ 1, B_10, A_10, C_10 },
|
||||
{ 1, B_11, A_11, C_11 },
|
||||
{ 1, B_12, A_12, C_12 },
|
||||
{ 1, B_13, A_13, C_13 },
|
||||
{ 1, B_14, A_14, C_14 },
|
||||
{ 1, B_15, A_15, C_15 },
|
||||
{ 1, B_16, A_16, C_16 },
|
||||
|
||||
//{ 1, E_1, D_1, F_1 },
|
||||
//{ 1, E_2, D_2, F_2 },
|
||||
//{ 1, E_3, D_3, F_3 },
|
||||
//{ 1, E_4, D_4, F_4 },
|
||||
//{ 1, E_5, D_5, F_5 },
|
||||
//{ 1, E_6, D_6, F_6 },
|
||||
//{ 1, E_7, D_7, F_7 },
|
||||
//{ 1, E_8, D_8, F_8 },
|
||||
//{ 1, E_9, D_9, F_9 },
|
||||
//{ 1, E_10, D_1, F_10 },
|
||||
//{ 1, E_11, D_1, F_11 },
|
||||
//{ 1, E_12, D_1, F_12 },
|
||||
//{ 1, E_13, D_1, F_13 },
|
||||
//{ 1, E_14, D_1, F_14 },
|
||||
//{ 1, E_15, D_15, F_15 },
|
||||
//{ 1, E_16, D_16, F_16 },
|
||||
{ 1, E_1, D_1, F_1 },
|
||||
{ 1, E_2, D_2, F_2 },
|
||||
{ 1, E_3, D_3, F_3 },
|
||||
{ 1, E_4, D_4, F_4 },
|
||||
{ 1, E_5, D_5, F_5 },
|
||||
{ 1, E_6, D_6, F_6 },
|
||||
{ 1, E_7, D_7, F_7 },
|
||||
{ 1, E_8, D_8, F_8 },
|
||||
{ 1, E_9, D_9, F_9 },
|
||||
{ 1, E_10, D_10, F_10 },
|
||||
{ 1, E_11, D_11, F_11 },
|
||||
{ 1, E_12, D_12, F_12 },
|
||||
{ 1, E_13, D_13, F_13 },
|
||||
{ 1, E_14, D_14, F_14 },
|
||||
{ 1, E_15, D_15, F_15 },
|
||||
{ 1, E_16, D_16, F_16 },
|
||||
|
||||
//{ 1, H_1, G_1, I_1 },
|
||||
//{ 1, H_2, G_2, I_2 },
|
||||
//{ 1, H_3, G_3, I_3 },
|
||||
//{ 1, H_4, G_4, I_4 },
|
||||
//{ 1, H_5, G_5, I_5 },
|
||||
//{ 1, H_6, G_6, I_6 },
|
||||
//{ 1, H_7, G_7, I_7 },
|
||||
//{ 1, H_8, G_8, I_8 },
|
||||
//{ 1, H_9, G_9, I_9 },
|
||||
//{ 1, H_10, G_1, I_10 },
|
||||
//{ 1, H_11, G_1, I_11 },
|
||||
//{ 1, H_12, G_1, I_12 },
|
||||
//{ 1, H_13, G_1, I_13 },
|
||||
//{ 1, H_14, G_1, I_14 },
|
||||
//{ 1, H_15, G_15, I_15 },
|
||||
//{ 1, H_16, G_16, I_16 },
|
||||
{ 1, H_1, G_1, I_1 },
|
||||
{ 1, H_2, G_2, I_2 },
|
||||
{ 1, H_3, G_3, I_3 },
|
||||
{ 1, H_4, G_4, I_4 },
|
||||
{ 1, H_5, G_5, I_5 },
|
||||
{ 1, H_6, G_6, I_6 },
|
||||
{ 1, H_7, G_7, I_7 },
|
||||
{ 1, H_8, G_8, I_8 },
|
||||
{ 1, H_9, G_9, I_9 },
|
||||
{ 1, H_10, G_10, I_10 },
|
||||
{ 1, H_11, G_11, I_11 },
|
||||
{ 1, H_12, G_12, I_12 },
|
||||
{ 1, H_13, G_13, I_13 },
|
||||
{ 1, H_14, G_14, I_14 },
|
||||
{ 1, H_15, G_15, I_15 },
|
||||
{ 1, H_16, G_16, I_16 },
|
||||
|
||||
//{ 1, K_1, J_1, L_1 },
|
||||
//{ 1, K_2, J_2, L_2 },
|
||||
//{ 1, K_3, J_3, L_3 },
|
||||
//{ 1, K_4, J_4, L_4 },
|
||||
//{ 1, K_5, J_5, L_5 },
|
||||
//{ 1, K_6, J_6, L_6 },
|
||||
//{ 1, K_7, J_7, L_7 }
|
||||
{ 1, K_1, J_1, L_1 },
|
||||
{ 1, K_2, J_2, L_2 },
|
||||
{ 1, K_3, J_3, L_3 },
|
||||
{ 1, K_4, J_4, L_4 },
|
||||
{ 1, K_5, J_5, L_5 },
|
||||
{ 1, K_6, J_6, L_6 },
|
||||
{ 1, K_7, J_7, L_7 }
|
||||
};
|
||||
|
||||
led_config_t g_led_config = {
|
||||
{
|
||||
// Key Matrix to LED Index
|
||||
{ 0, 10, 20, 29, 38, 47, 57, NO_LED, NO_LED, NO_LED },
|
||||
{ 1, 11, 21, NO_LED, 39, 48, 58, NO_LED, NO_LED, NO_LED },
|
||||
{ 2, 12, 22, 30, 40, 49, 59, NO_LED, NO_LED, NO_LED },
|
||||
{ 3, 13, 23, 31, 41, 50, 60, NO_LED, NO_LED, NO_LED },
|
||||
{ 4, 14, 24, 32, 42, 51, 61, NO_LED, NO_LED, NO_LED },
|
||||
{ 5, 15, 25, 33, 43, 52, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ 6, 16, 26, 34, 44, 53, 62, NO_LED, NO_LED, NO_LED },
|
||||
{ 7, 17, 27, 35, 45, 54, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ 8, 18, 28, 36, 46, 55, 63, NO_LED, NO_LED, NO_LED },
|
||||
{ 9, 19, NO_LED, 37, NO_LED, 56, NO_LED, NO_LED, NO_LED, NO_LED }
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
|
||||
{ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
|
||||
{ 20, 21, 22, 23, 24, 25, 26, 27, 28, NO_LED },
|
||||
{ 29, NO_LED, 30, 31, 32, 33, 34, 35, 36, 37 },
|
||||
{ 38, 39, 40, 41, 42, 43, 44, 45, 46, NO_LED },
|
||||
{ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 },
|
||||
{ 57, 58, 59, 60, 61, NO_LED, 62, NO_LED, 63, NO_LED },
|
||||
{ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73 },
|
||||
{ NO_LED, 74, NO_LED, 75, 76, 77, 78, 79, 80, 81 },
|
||||
{ 82, 83, 84, 85, 86, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }
|
||||
}, {
|
||||
// LED Index to Physical Position
|
||||
// Key LED
|
||||
{ 0, 0 }, { 26.35, 0 }, { 39.53, 0 }, { 52.71, 0 }, { 65.88, 0 }, { 79.06, 0 }, { 92.24, 0 }, { 105.41, 0 }, { 118.59, 0 }, { 131.77, 0 }, { 144.94, 0 }, { 158.12, 0 }, { 171.29, 0 }, { 197.65, 0 }, { 210.82, 0 }, { 224, 0 },
|
||||
|
||||
{ 0, 21.33 }, { 13.18, 21.33 }, { 26.35, 21.33 }, { 39.53, 21.33 }, { 52.71, 21.33 }, { 65.88, 21.33 }, { 79.06, 21.33 }, { 92.24, 21.33 }, { 105.41, 21.33 }, { 118.59, 21.33 }, { 131.77, 21.33 }, { 144.94, 21.33 }, { 158.12, 21.33 }, { 171.29, 21.33 }, { 197.65, 21.33 }, { 210.82, 21.33 }, { 224, 21.33 },
|
||||
{ 0, 32 }, { 13.18, 32 }, { 26.35, 32 }, { 39.53, 32 }, { 52.71, 32 }, { 65.88, 32 }, { 79.06, 32 }, { 92.24, 32 }, { 105.41, 32 }, { 118.59, 32 }, { 131.77, 32 }, { 144.94, 32 }, { 158.12, 32 }, { 171.29, 32 }, { 197.65, 32 }, { 210.82, 32 }, { 224, 32 },
|
||||
{ 0, 42.67 }, { 13.18, 42.67 }, { 26.35, 42.67 }, { 39.53, 42.67 }, { 52.71, 42.67 }, { 65.88, 42.67 }, { 79.06, 42.67 }, { 92.24, 42.67 }, { 105.41, 42.67 }, { 118.59, 42.67 }, { 131.77, 42.67 }, { 144.94, 42.67 }, { 171.29, 42.67 },
|
||||
{ 0, 53.33 }, //{ 26.35, 53.33 }, { 39.53, 53.33 }, { 52.71, 53.33 }, { 65.88, 53.33 }, { 79.06, 53.33 }, { 92.24, 53.33 }, { 105.41, 53.33 }, { 118.59, 53.33 }, { 131.77, 53.33 }, { 144.94, 53.33 }, { 171.29, 53.33 }, { 210.82, 53.33 },
|
||||
//{ 0, 64 }, { 13.18, 64 }, { 26.35, 64 }, { 79.06, 64 }, { 131.77, 64 }, { 144.94, 64 }, { 158.12, 64 }, { 171.29, 64 }, { 197.65, 64 }, { 210.82, 64 }, { 224, 64 }
|
||||
{ 0, 53.33 }, { 26.35, 53.33 }, { 39.53, 53.33 }, { 52.71, 53.33 }, { 65.88, 53.33 }, { 79.06, 53.33 }, { 92.24, 53.33 }, { 105.41, 53.33 }, { 118.59, 53.33 }, { 131.77, 53.33 }, { 144.94, 53.33 }, { 171.29, 53.33 }, { 210.82, 53.33 },
|
||||
{ 0, 64 }, { 13.18, 64 }, { 26.35, 64 }, { 79.06, 64 }, { 131.77, 64 }, { 144.94, 64 }, { 158.12, 64 }, { 171.29, 64 }, { 197.65, 64 }, { 210.82, 64 }, { 224, 64 },
|
||||
|
||||
// Underglow LED
|
||||
{ 224, 64 }, { 206.77, 64 }, { 189.54, 64 }, { 172.31, 64 }, { 155.08, 64 }, { 137.85, 64 }, { 120.61, 64 }, { 103.38, 64 }, { 86.15, 64 }, { 68.92, 64 }, { 51.69, 64 }, { 34.46, 64 }, { 17.23, 64 }, { 0, 64 },
|
||||
{ 0, 42.67 }, { 0, 21.33 },
|
||||
{ 0, 0 }, { 17.23, 0 }, { 34.46, 0 }, { 51.69, 0 }, { 68.92, 0 }, { 86.15, 0 }, { 103.38, 0 }, { 120.61, 0 }, { 137.85, 0 }, { 155.08, 0 }, { 172.31, 0 }, { 189.54, 0 }, { 206.77, 0 }, { 224, 0 },
|
||||
{ 224, 21.33 }, { 224, 42.67 }
|
||||
}, {
|
||||
// LED Index to Flag
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
//Key LED
|
||||
1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1,
|
||||
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 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,
|
||||
//1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
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,
|
||||
1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
|
||||
|
||||
// Underglow LED
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
|
||||
2, 2,
|
||||
|
||||
2, 2,
|
||||
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
52
keyboards/k_type/keymaps/andrew-fahmy/config.h
Normal file
52
keyboards/k_type/keymaps/andrew-fahmy/config.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* Copyright 2021 Andrew Fahmy
|
||||
*
|
||||
* 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
|
||||
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
// # define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
// # define RGB_MATRIX_KEYPRESSES
|
||||
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_RAINDROPS
|
||||
|
||||
// # define DEBUG_MATRIX_SCAN_RATE
|
||||
|
||||
# define RGB_MATRIX_LED_FLUSH_LIMIT 100
|
||||
// # define RGB_MATRIX_LED_PROCESS_LIMIT 2
|
||||
|
||||
// i2c_master defines
|
||||
# define I2C_COUNT 2
|
||||
|
||||
# define I2C1_BANK GPIOB
|
||||
# define I2C1_SCL 0 // A2 on pinout = B0
|
||||
# define I2C1_SDA 1 // A2 on pinout = B1
|
||||
# define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
# define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
|
||||
# define USE_I2C2
|
||||
# define I2C2_BANK GPIOC
|
||||
# define I2C2_SCL 10 // A2 on pinout = C10
|
||||
# define I2C2_SDA 11 // A2 on pinout = C11
|
||||
# define I2C2_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
# define I2C2_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
|
||||
# define DRIVER_ADDR_1 0b1010000
|
||||
# define DRIVER_ADDR_2 0b1010000
|
||||
# define DRIVER_COUNT 2
|
||||
# define DRIVER_1_LED_TOTAL 64
|
||||
# define DRIVER_2_LED_TOTAL 55
|
||||
# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||
#endif
|
||||
60
keyboards/k_type/keymaps/andrew-fahmy/keymap.c
Normal file
60
keyboards/k_type/keymaps/andrew-fahmy/keymap.c
Normal file
@@ -0,0 +1,60 @@
|
||||
/* Copyright 2021 Andrew Fahmy
|
||||
*
|
||||
* 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
|
||||
|
||||
enum layer_names {
|
||||
_MAIN,
|
||||
_L1
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MAIN] = LAYOUT_tkl_ansi(
|
||||
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, KC_PAUS,
|
||||
|
||||
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,
|
||||
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_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||
MO(_L1), 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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||
KC_LCTL, _______, KC_LALT, KC_SPC, KC_RALT, MO(_L1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[_L1] = LAYOUT_tkl_ansi(
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______,
|
||||
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_HUI, RGB_SAI, RGB_VAI,
|
||||
_______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD,
|
||||
_______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Customise these values to desired behaviour
|
||||
// debug_enable=true;
|
||||
// debug_matrix=true;
|
||||
// debug_keyboard=true;
|
||||
// debug_mouse=true;
|
||||
}
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
// Turn off SDB
|
||||
void keyboard_pre_init_user() {
|
||||
palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPad(GPIOB, 16);
|
||||
}
|
||||
|
||||
#endif
|
||||
1
keyboards/k_type/keymaps/andrew-fahmy/rules.mk
Normal file
1
keyboards/k_type/keymaps/andrew-fahmy/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
@@ -2,22 +2,31 @@
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_KEYPRESSES
|
||||
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
|
||||
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
|
||||
|
||||
# define RGB_MATRIX_LED_FLUSH_LIMIT 100
|
||||
|
||||
|
||||
// i2c_master defines
|
||||
# define I2C_COUNT 2
|
||||
|
||||
# define I2C1_BANK GPIOB
|
||||
# define I2C1_SCL 0 // A2 on pinout = B0
|
||||
# define I2C1_SDA 1 // A2 on pinout = B1
|
||||
# define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
# define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
//# define I2C2_SCL 10 // A2 on pinout = C10
|
||||
//# define I2C2_SDA 11 // A2 on pinout = C11
|
||||
//# define I2C2_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
//# define I2C2_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
|
||||
# define USE_I2C2
|
||||
# define I2C2_BANK GPIOC
|
||||
# define I2C2_SCL 10 // A2 on pinout = C10
|
||||
# define I2C2_SDA 11 // A2 on pinout = C11
|
||||
# define I2C2_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
# define I2C2_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
|
||||
# define DRIVER_ADDR_1 0b1010000
|
||||
# define DRIVER_ADDR_2 0b1010001
|
||||
# define DRIVER_ADDR_2 0b1010000
|
||||
# define DRIVER_COUNT 2
|
||||
# define DRIVER_1_LED_TOTAL 64
|
||||
//# define DRIVER_2_LED_TOTAL 55
|
||||
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
|
||||
# define DRIVER_2_LED_TOTAL 55
|
||||
# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||
#endif
|
||||
|
||||
@@ -8,12 +8,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||
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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[1] = LAYOUT_tkl_ansi(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______,
|
||||
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_HUI, RGB_SAI, RGB_VAI,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
This is an experimental keymap adding support for RGB Matrix on the K-Type.
|
||||
|
||||
The board has two IS31FL3733 LED controllers, but they are each on different I2C buses, which QMK's `i2c_master` implementation currently does not support. As a result, all the keys after the left shift will not be lit.
|
||||
The keyboard should now support full RGB lightings. The lighting animations are running at 10 fps for performance reasons.
|
||||
You can configure this by changing the `RGB_MATRIX_LED_FLUSH_LIMIT` inside the `config.h` file to a lower value.
|
||||
For example `RGB_MATRIX_LED_FLUSH_LIMIT 16` would mean that the animations run every 16 ms or at 60 fps.
|
||||
|
||||
@@ -51,4 +51,7 @@
|
||||
#define KINETIS_I2C_USE_I2C0 TRUE
|
||||
#define KINETIS_I2C_I2C0_PRIORITY 4
|
||||
|
||||
#define KINETIS_I2C_USE_I2C1 TRUE
|
||||
#define KINETIS_I2C_I2C0_PRIORITY 4
|
||||
|
||||
#endif /* _MCUCONF_H_ */
|
||||
|
||||
@@ -27,7 +27,11 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
RGB_MATRIX_ENABLE = no
|
||||
RGB_MATRIX_DRIVER = IS31FL3733
|
||||
RGB_MATRIX_DRIVER = custom
|
||||
|
||||
SRC += k_type-rgbdriver.c
|
||||
|
||||
QUANTUM_LIB_SRC += i2c_master.c is31fl3733-dual.c
|
||||
|
||||
LAYOUTS = tkl_ansi
|
||||
|
||||
|
||||
46
keyboards/kb_elmo/twelvekey/config.h
Normal file
46
keyboards/kb_elmo/twelvekey/config.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright 2021 kb-elmo<mail@elmo.space>
|
||||
|
||||
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
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xA68C
|
||||
#define PRODUCT_ID 0x9879
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER kb-elmo
|
||||
#define PRODUCT Twelvekey
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 3
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
/* Keyboard Matrix Assignments */
|
||||
#define MATRIX_ROW_PINS { D1, C4, D7 }
|
||||
#define MATRIX_COL_PINS { C5, D0, B0, D6 }
|
||||
|
||||
/* COL2ROW, ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Backlight */
|
||||
#define BACKLIGHT_PIN B1
|
||||
#define BACKLIGHT_LEVELS 8
|
||||
#define BACKLIGHT_ON_STATE 0
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
24
keyboards/kb_elmo/twelvekey/info.json
Normal file
24
keyboards/kb_elmo/twelvekey/info.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"keyboard_name": "twelvekey",
|
||||
"url": "https://github.com/kb-elmo/twelvekey",
|
||||
"maintainer": "kb-elmo",
|
||||
"width": 4,
|
||||
"height": 3,
|
||||
"layouts": {
|
||||
"LAYOUT_ortho_3x4": {
|
||||
"layout": [{"x":0, "y":0},
|
||||
{"x":1, "y":0},
|
||||
{"x":2, "y":0},
|
||||
{"x":3, "y":0},
|
||||
{"x":0, "y":1},
|
||||
{"x":1, "y":1},
|
||||
{"x":2, "y":1},
|
||||
{"x":3, "y":1},
|
||||
{"x":0, "y":2},
|
||||
{"x":1, "y":2},
|
||||
{"x":2, "y":2},
|
||||
{"x":3, "y":2}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
24
keyboards/kb_elmo/twelvekey/keymaps/default/keymap.c
Normal file
24
keyboards/kb_elmo/twelvekey/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2021 kb-elmo<mail@elmo.space>
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_ortho_3x4(
|
||||
KC_1, KC_2, KC_3, KC_4,
|
||||
KC_5, KC_6, KC_7, KC_8,
|
||||
KC_9, KC_0, KC_A, KC_B
|
||||
)
|
||||
};
|
||||
39
keyboards/kb_elmo/twelvekey/keymaps/via/keymap.c
Normal file
39
keyboards/kb_elmo/twelvekey/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,39 @@
|
||||
/* Copyright 2021 kb-elmo<mail@elmo.space>
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_ortho_3x4(
|
||||
KC_1, KC_2, KC_3, KC_4,
|
||||
KC_5, KC_6, KC_7, KC_8,
|
||||
KC_9, KC_0, KC_A, KC_B
|
||||
),
|
||||
[1] = LAYOUT_ortho_3x4(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[2] = LAYOUT_ortho_3x4(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[3] = LAYOUT_ortho_3x4(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
||||
1
keyboards/kb_elmo/twelvekey/keymaps/via/rules.mk
Normal file
1
keyboards/kb_elmo/twelvekey/keymaps/via/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
19
keyboards/kb_elmo/twelvekey/readme.md
Normal file
19
keyboards/kb_elmo/twelvekey/readme.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Twelvekey
|
||||
|
||||

|
||||
|
||||
Simple 12-key macropad
|
||||
|
||||
* Keyboard Maintainer: [kb-elmo](https://github.com/kb-elmo)
|
||||
* Hardware Supported: Twelvekey PCB with backlight
|
||||
* Hardware Availability: [Open source project](https://github.com/kb-elmo/twelvekey)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make kb_elmo/twelvekey:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make kb_elmo/twelvekey:default:flash
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
25
keyboards/kb_elmo/twelvekey/rules.mk
Normal file
25
keyboards/kb_elmo/twelvekey/rules.mk
Normal file
@@ -0,0 +1,25 @@
|
||||
# MCU name
|
||||
MCU = atmega328p
|
||||
|
||||
# Processor frequency
|
||||
F_CPU = 16000000
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = USBasp
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
17
keyboards/kb_elmo/twelvekey/twelvekey.c
Normal file
17
keyboards/kb_elmo/twelvekey/twelvekey.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Copyright 2021 kb-elmo<mail@elmo.space>
|
||||
*
|
||||
* 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 "twelvekey.h"
|
||||
37
keyboards/kb_elmo/twelvekey/twelvekey.h
Normal file
37
keyboards/kb_elmo/twelvekey/twelvekey.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/* Copyright 2021 kb-elmo<mail@elmo.space>
|
||||
*
|
||||
* 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
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This is a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT_ortho_3x4( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, k23 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03 }, \
|
||||
{ k10, k11, k12, k13 }, \
|
||||
{ k20, k21, k22, k23 } \
|
||||
}
|
||||
108
keyboards/kopibeng/xt65/config.h
Normal file
108
keyboards/kopibeng/xt65/config.h
Normal file
@@ -0,0 +1,108 @@
|
||||
/* Copyright 2021 Samuel Lu
|
||||
*
|
||||
* 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
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x4B50 // 'KP' kopibeng
|
||||
#define PRODUCT_ID 0x0650
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER kopibeng
|
||||
#define PRODUCT XT65
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { B5, B4, D7, D6, D4 }
|
||||
#define MATRIX_COL_PINS { D1, D2, D3, B6, C6, C7, F0, F1, F4, F5, F6, F7, B2, B3, B7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN B1
|
||||
// #define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 5
|
||||
|
||||
#define RGB_DI_PIN D5
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */
|
||||
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
/*== all animations enable ==*/
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
// /*== or choose animations ==*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHING
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
// #define RGBLIGHT_EFFECT_SNAKE
|
||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||
80
keyboards/kopibeng/xt65/info.json
Normal file
80
keyboards/kopibeng/xt65/info.json
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"keyboard_name": "kopibeng XT65",
|
||||
"url": "",
|
||||
"maintainer": "kopibeng",
|
||||
"width": 16,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"K00 (B5,D1)", "x":0, "y":0},
|
||||
{"label":"K01 (B5,D2)", "x":1, "y":0},
|
||||
{"label":"K02 (B5,D3)", "x":2, "y":0},
|
||||
{"label":"K03 (B5,B6)", "x":3, "y":0},
|
||||
{"label":"K04 (B5,C6)", "x":4, "y":0},
|
||||
{"label":"K05 (B5,C7)", "x":5, "y":0},
|
||||
{"label":"K06 (B5,F0)", "x":6, "y":0},
|
||||
{"label":"K07 (B5,F1)", "x":7, "y":0},
|
||||
{"label":"K08 (B5,F4)", "x":8, "y":0},
|
||||
{"label":"K09 (B5,F5)", "x":9, "y":0},
|
||||
{"label":"K0A (B5,F6)", "x":10, "y":0},
|
||||
{"label":"K0B (B5,F7)", "x":11, "y":0},
|
||||
{"label":"K0C (B5,B2)", "x":12, "y":0},
|
||||
{"label":"K0D (B5,B3)", "x":13, "y":0},
|
||||
{"label":"K1D (B4,B3)", "x":14, "y":0},
|
||||
{"label":"K0E (B5,B7)", "x":15, "y":0},
|
||||
{"label":"K10 (B4,D1)", "x":0, "y":1, "w":1.5},
|
||||
{"label":"K11 (B4,D2)", "x":1.5, "y":1},
|
||||
{"label":"K12 (B4,D3)", "x":2.5, "y":1},
|
||||
{"label":"K13 (B4,B6)", "x":3.5, "y":1},
|
||||
{"label":"K14 (B4,C6)", "x":4.5, "y":1},
|
||||
{"label":"K15 (B4,C7)", "x":5.5, "y":1},
|
||||
{"label":"K16 (B4,F0)", "x":6.5, "y":1},
|
||||
{"label":"K17 (B4,F1)", "x":7.5, "y":1},
|
||||
{"label":"K18 (B4,F4)", "x":8.5, "y":1},
|
||||
{"label":"K19 (B4,F5)", "x":9.5, "y":1},
|
||||
{"label":"K1A (B4,F6)", "x":10.5, "y":1},
|
||||
{"label":"K1B (B4,F7)", "x":11.5, "y":1},
|
||||
{"label":"K1C (B4,B2)", "x":12.5, "y":1},
|
||||
{"label":"K2D (D7,B3)", "x":13.5, "y":1, "w":1.5},
|
||||
{"label":"K1E (B4,B7)", "x":15, "y":1},
|
||||
{"label":"K20 (D7,D1)", "x":0, "y":2, "w":1.25},
|
||||
{"label":"K21 (D7,D2)", "x":1.75, "y":2},
|
||||
{"label":"K22 (D7,D3)", "x":2.75, "y":2},
|
||||
{"label":"K23 (D7,B6)", "x":3.75, "y":2},
|
||||
{"label":"K24 (D7,C6)", "x":4.75, "y":2},
|
||||
{"label":"K25 (D7,C7)", "x":5.75, "y":2},
|
||||
{"label":"K26 (D7,F0)", "x":6.75, "y":2},
|
||||
{"label":"K27 (D7,F1)", "x":7.75, "y":2},
|
||||
{"label":"K28 (D7,F4)", "x":8.75, "y":2},
|
||||
{"label":"K29 (D7,F5)", "x":9.75, "y":2},
|
||||
{"label":"K2A (D7,F6)", "x":10.75, "y":2},
|
||||
{"label":"K2B (D7,F7)", "x":11.75, "y":2},
|
||||
{"label":"K2C (D7,B2)", "x":12.75, "y":2, "w":2.25},
|
||||
{"label":"K2E (D7,B7)", "x":15, "y":2},
|
||||
{"label":"K30 (D6,D1)", "x":0, "y":3, "w":2.25},
|
||||
{"label":"K31 (D6,D2)", "x":2.25, "y":3},
|
||||
{"label":"K32 (D6,D3)", "x":3.25, "y":3},
|
||||
{"label":"K33 (D6,B6)", "x":4.25, "y":3},
|
||||
{"label":"K34 (D6,C6)", "x":5.25, "y":3},
|
||||
{"label":"K35 (D6,C7)", "x":6.25, "y":3},
|
||||
{"label":"K36 (D6,F0)", "x":7.25, "y":3},
|
||||
{"label":"K37 (D6,F1)", "x":8.25, "y":3},
|
||||
{"label":"K38 (D6,F4)", "x":9.25, "y":3},
|
||||
{"label":"K39 (D6,F5)", "x":10.25, "y":3},
|
||||
{"label":"K3A (D6,F6)", "x":11.25, "y":3},
|
||||
{"label":"K3B (D6,F7)", "x":12.25, "y":3, "w":1.75},
|
||||
{"label":"K3D (D6,B3)", "x":14, "y":3},
|
||||
{"label":"K3E (D6,B7)", "x":15, "y":3},
|
||||
{"label":"K40 (D4,D1)", "x":0, "y":4, "w":1.5},
|
||||
{"label":"K41 (D4,D2)", "x":1.5, "y":4},
|
||||
{"label":"K42 (D4,D3)", "x":2.5, "y":4, "w":1.5},
|
||||
{"label":"K45 (D4,C7)", "x":4, "y":4, "w":7},
|
||||
{"label":"K4A (D4,F6)", "x":11, "y":4, "w":1.5},
|
||||
{"label":"K4C (D4,B2)", "x":13, "y":4},
|
||||
{"label":"K4D (D4,B3)", "x":14, "y":4},
|
||||
{"label":"K4E (D4,B7)", "x":15, "y":4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
48
keyboards/kopibeng/xt65/keymaps/default/keymap.c
Normal file
48
keyboards/kopibeng/xt65/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,48 @@
|
||||
/* Copyright 2021 Samuel Lu
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// Default layer
|
||||
[0] = LAYOUT_all(
|
||||
KC_GESC, 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_BSLS, KC_DEL, KC_PGUP,
|
||||
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_RBRC, KC_BSPC, KC_PGDN,
|
||||
KC_LCTL, 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_HOME,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
MO(1), KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
// Fn1 Layer
|
||||
[1] = LAYOUT_all(
|
||||
KC_TRNS, 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_TRNS, KC_TRNS, RESET,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
// Fn2 Layer
|
||||
[2] = LAYOUT_all(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
57
keyboards/kopibeng/xt65/keymaps/via/keymap.c
Normal file
57
keyboards/kopibeng/xt65/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,57 @@
|
||||
/* Copyright 2021 Samuel Lu
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// Default layer
|
||||
[0] = LAYOUT_all(
|
||||
KC_GESC, 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_DEL, KC_PGUP,
|
||||
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_RBRC, KC_BSLS, KC_PGDN,
|
||||
KC_LCTL, 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_HOME,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
MO(1), KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
// Fn1 Layer
|
||||
[1] = LAYOUT_all(
|
||||
KC_TRNS, 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_TRNS, KC_TRNS, RESET,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
// Fn2 Layer
|
||||
[2] = LAYOUT_all(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
// Fn3 Layer
|
||||
[3] = LAYOUT_all(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
1
keyboards/kopibeng/xt65/keymaps/via/rules.mk
Normal file
1
keyboards/kopibeng/xt65/keymaps/via/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
17
keyboards/kopibeng/xt65/readme.md
Normal file
17
keyboards/kopibeng/xt65/readme.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# XT65
|
||||
|
||||

|
||||
|
||||
A 65% PCB with support for VIA, LED backlight and RGB underglow.
|
||||
|
||||
* Keyboard Maintainer: kopibeng
|
||||
* Hardware Supported: A 65% keyboard with ATMEGA32U4
|
||||
* Hardware Availability: N/A
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make kopibeng/xt65:default
|
||||
|
||||
Press the switch (SW1) on bottom side of PCB to enter bootloader.
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
22
keyboards/kopibeng/xt65/rules.mk
Normal file
22
keyboards/kopibeng/xt65/rules.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
17
keyboards/kopibeng/xt65/xt65.c
Normal file
17
keyboards/kopibeng/xt65/xt65.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Copyright 2021 Samuel Lu
|
||||
*
|
||||
* 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 "xt65.h"
|
||||
65
keyboards/kopibeng/xt65/xt65.h
Normal file
65
keyboards/kopibeng/xt65/xt65.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/* Copyright 2021 Samuel Lu
|
||||
*
|
||||
* 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
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define ____ KC_NO
|
||||
|
||||
|
||||
|
||||
#define LAYOUT_all( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K113, K014, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K213, K114, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
|
||||
K400, K401, K402, K405, K409, K410, K412, K413, K414 \
|
||||
) { \
|
||||
{K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014}, \
|
||||
{K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114}, \
|
||||
{K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214}, \
|
||||
{K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, ____, K313, K314}, \
|
||||
{K400, K401, K402, ____, ____, K405, ____, ____, ____, K409, K410, ____, K412, K413, K414} \
|
||||
}
|
||||
|
||||
#define LAYOUT_65_7u_split_bs( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K113, K014, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K213, K114, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
|
||||
K400, K401, K402, K405, K410, K412, K413, K414 \
|
||||
) { \
|
||||
{K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014}, \
|
||||
{K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114}, \
|
||||
{K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214}, \
|
||||
{K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, ____, K313, K314}, \
|
||||
{K400, K401, K402, ____, ____, K405, ____, ____, ____, ____, K410, ____, K412, K413, K414} \
|
||||
}
|
||||
|
||||
#define LAYOUT_65_625u( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K213, K114, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
|
||||
K400, K401, K402, K405, K409, K410, K412, K413, K414 \
|
||||
) { \
|
||||
{K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014}, \
|
||||
{K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114}, \
|
||||
{K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214}, \
|
||||
{K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, ____, K313, K314}, \
|
||||
{K400, K401, K402, ____, ____, K405, ____, ____, ____, K409, K410, ____, K412, K413, K414} \
|
||||
}
|
||||
131
keyboards/massdrop/alt/keymaps/hlmtre/keymap.c
Normal file
131
keyboards/massdrop/alt/keymaps/hlmtre/keymap.c
Normal file
@@ -0,0 +1,131 @@
|
||||
/* Copyright 2021 hlmtre
|
||||
*
|
||||
* 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
|
||||
|
||||
enum alt_keycodes {
|
||||
U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
|
||||
U_T_AGCR, //USB Toggle Automatic GCR control
|
||||
DBG_TOG, //DEBUG Toggle On / Off
|
||||
DBG_MTRX, //DEBUG Toggle Matrix Prints
|
||||
DBG_KBD, //DEBUG Toggle Keyboard Prints
|
||||
DBG_MOU, //DEBUG Toggle Mouse Prints
|
||||
MD_BOOT, //Restart into bootloader after hold timeout
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_65_ansi_blocker(
|
||||
KC_ESC, 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_DEL, \
|
||||
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_RBRC, KC_BSLS, KC_HOME, \
|
||||
MO(1), 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_PGUP, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \
|
||||
),
|
||||
[1] = LAYOUT_65_ansi_blocker(
|
||||
KC_GRV, 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_MUTE, \
|
||||
_______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
|
||||
_______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
|
||||
_______, RGB_TOG, _______, _______, _______, MD_BOOT, NK_TOGG, DBG_TOG, _______, _______, _______, _______, KC_VOLU, KC_VOLD, \
|
||||
_______, _______, _______, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT \
|
||||
),
|
||||
/*
|
||||
[X] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
*/
|
||||
};
|
||||
|
||||
#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
|
||||
#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
|
||||
#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
static uint32_t key_timer;
|
||||
|
||||
switch (keycode) {
|
||||
case U_T_AUTO:
|
||||
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
||||
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
|
||||
}
|
||||
return false;
|
||||
case U_T_AGCR:
|
||||
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
||||
TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
|
||||
}
|
||||
return false;
|
||||
case DBG_TOG:
|
||||
if (record->event.pressed) {
|
||||
TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
|
||||
}
|
||||
return false;
|
||||
case DBG_MTRX:
|
||||
if (record->event.pressed) {
|
||||
TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
|
||||
}
|
||||
return false;
|
||||
case DBG_KBD:
|
||||
if (record->event.pressed) {
|
||||
TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
|
||||
}
|
||||
return false;
|
||||
case DBG_MOU:
|
||||
if (record->event.pressed) {
|
||||
TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
|
||||
}
|
||||
return false;
|
||||
case MD_BOOT:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read32();
|
||||
} else {
|
||||
if (timer_elapsed32(key_timer) >= 500) {
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case RGB_TOG:
|
||||
if (record->event.pressed) {
|
||||
switch (rgb_matrix_get_flags()) {
|
||||
case LED_FLAG_ALL: {
|
||||
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
|
||||
rgb_matrix_set_color_all(0, 0, 0);
|
||||
}
|
||||
break;
|
||||
case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): {
|
||||
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
|
||||
rgb_matrix_set_color_all(0, 0, 0);
|
||||
}
|
||||
break;
|
||||
case LED_FLAG_UNDERGLOW: {
|
||||
rgb_matrix_set_flags(LED_FLAG_NONE);
|
||||
rgb_matrix_disable_noeeprom();
|
||||
}
|
||||
break;
|
||||
default: {
|
||||
rgb_matrix_set_flags(LED_FLAG_ALL);
|
||||
rgb_matrix_enable_noeeprom();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
return true; //Process all other keycodes normally
|
||||
}
|
||||
}
|
||||
80
keyboards/nix_studio/oxalys80/config.h
Normal file
80
keyboards/nix_studio/oxalys80/config.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/* Copyright 2021 Nix Studio
|
||||
*
|
||||
* 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
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x6E78
|
||||
#define PRODUCT_ID 0x3830
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Nix Studio
|
||||
#define PRODUCT OXALYS80
|
||||
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 12
|
||||
#define MATRIX_COLS 9
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 }
|
||||
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B0, B1 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGB_DI_PIN B3
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 24
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 200
|
||||
#define RGBLIGHT_SLEEP // RGB will turn off when PC is put to sleep
|
||||
#endif
|
||||
|
||||
#define LED_CAPS_LOCK_PIN E6
|
||||
#define LED_SCROLL_LOCK_PIN B2
|
||||
#define LED_PIN_ON_STATE 0
|
||||
1365
keyboards/nix_studio/oxalys80/info.json
Normal file
1365
keyboards/nix_studio/oxalys80/info.json
Normal file
File diff suppressed because it is too large
Load Diff
36
keyboards/nix_studio/oxalys80/keymaps/default/keymap.c
Normal file
36
keyboards/nix_studio/oxalys80/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,36 @@
|
||||
/* Copyright 2021 Nix Studio
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT_all(
|
||||
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, KC_PAUS,
|
||||
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_BSLS, KC_GRV, KC_INS, KC_HOME, KC_PGUP,
|
||||
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_RBRC, KC_BSPC, KC_DEL, KC_END, KC_PGDN,
|
||||
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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
[1] = LAYOUT_all(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
};
|
||||
1
keyboards/nix_studio/oxalys80/keymaps/default/readme.md
Normal file
1
keyboards/nix_studio/oxalys80/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for oxalys80
|
||||
52
keyboards/nix_studio/oxalys80/keymaps/via/keymap.c
Normal file
52
keyboards/nix_studio/oxalys80/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,52 @@
|
||||
/* Copyright 2021 Nix Studio
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT_all(
|
||||
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, KC_PAUS,
|
||||
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_GRV, KC_INS, KC_HOME, KC_PGUP,
|
||||
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_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||
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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
[1] = LAYOUT_all(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
[2] = LAYOUT_all(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
[3] = LAYOUT_all(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
};
|
||||
1
keyboards/nix_studio/oxalys80/keymaps/via/readme.md
Normal file
1
keyboards/nix_studio/oxalys80/keymaps/via/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default VIA keymap for oxalys80
|
||||
1
keyboards/nix_studio/oxalys80/keymaps/via/rules.mk
Normal file
1
keyboards/nix_studio/oxalys80/keymaps/via/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
26
keyboards/nix_studio/oxalys80/oxalys80.c
Normal file
26
keyboards/nix_studio/oxalys80/oxalys80.c
Normal file
@@ -0,0 +1,26 @@
|
||||
/* Copyright 2021 Nix Studio
|
||||
*
|
||||
* 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 "oxalys80.h"
|
||||
|
||||
|
||||
void eeconfig_init_kb(void) { // EEPROM is getting reset!
|
||||
rgblight_enable(); // Enable RGB by default
|
||||
rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness
|
||||
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default
|
||||
|
||||
eeconfig_update_kb(0);
|
||||
eeconfig_init_user();
|
||||
}
|
||||
45
keyboards/nix_studio/oxalys80/oxalys80.h
Normal file
45
keyboards/nix_studio/oxalys80/oxalys80.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Copyright 2021 Nix Studio
|
||||
*
|
||||
* 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
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The following is an example using the Planck MIT layout
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
|
||||
#define LAYOUT_all(\
|
||||
K000, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K007, K017, K008, \
|
||||
K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K066, K027, K037, K028, \
|
||||
K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K047, K057, K048, \
|
||||
K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \
|
||||
K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K097, \
|
||||
K100, K110, K101, K103, K105, K115, K106, K116, K107, K117, K108 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \
|
||||
{ KC_NO, K011, K012, K013, K014, K015, K016, K017, KC_NO }, \
|
||||
{ K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \
|
||||
{ K030, K031, K032, K033, K034, K035, K036, K037, KC_NO }, \
|
||||
{ K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \
|
||||
{ K050, K051, K052, K053, K054, K055, K056, K057, KC_NO }, \
|
||||
{ K060, K061, K062, K063, K064, K065, K066, KC_NO, KC_NO }, \
|
||||
{ K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \
|
||||
{ K080, K081, K082, K083, K084, K085, K086, KC_NO, KC_NO }, \
|
||||
{ K090, K091, K092, K093, K094, K095, K096, K097, KC_NO }, \
|
||||
{ K100, K101, KC_NO, K103, KC_NO, K105, K106, K107, K108 }, \
|
||||
{ K110, KC_NO, KC_NO, KC_NO, KC_NO, K115, K116, K117, KC_NO } \
|
||||
}
|
||||
43
keyboards/nix_studio/oxalys80/readme.md
Normal file
43
keyboards/nix_studio/oxalys80/readme.md
Normal file
@@ -0,0 +1,43 @@
|
||||
oxalys80
|
||||
===
|
||||
|
||||
A QMK-powered replacement PCB for custom TKL keyboards. This PCB has the same size of the b.87 PCB, Hiney H87a, KBD8X.
|
||||
|
||||
Keyboard Maintainer: [Nix Studio](https://github.com/Nix-Studio)
|
||||
Hardware Supported: oxalys80 ver. 1.0
|
||||
Hardware Availability: [Nix Studio](https://www.instagram.com/nix.studio/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make nix_studio/oxalys80:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
## oxalys80 hardware information
|
||||
|
||||
Controller: Atmega32u4
|
||||
|
||||
/* Column pin configuration
|
||||
* col: 0 1 2 3 4 5 6 7 8
|
||||
* pin: F0 F1 F4 F5 F6 F7 C7 B0 B1
|
||||
*/
|
||||
|
||||
/* Row pin configuration
|
||||
* row: 0 1 2 3 4 5 6 7 8 9 10 11
|
||||
* pin: C6 B6 B5 B4 D7 D6 D4 D5 D3 D2 D1 D0
|
||||
*/
|
||||
|
||||
The oxalys PCB utilizes duplex matrix organization.
|
||||
|
||||
Caps Lock LED: E6
|
||||
Scroll Lock LED: B2
|
||||
Num Lock LED: not supported
|
||||
Backlight Pin: B7
|
||||
RGB Data Pin: B3
|
||||
|
||||
|
||||
|
||||
In-switch indicators:
|
||||
To connect the Caps Lock LED to the main backlight matrix, turn switch to top position on SW3. To use the Caps Lock LED as an indicator, turn switch to bottom position on SW3.
|
||||
|
||||
To connect the Scroll Lock LED to the main backlight matrix, turn switch to left position on SW2. To use the Scroll Lock LED as an indicator, turn switch to right position on SW2.
|
||||
23
keyboards/nix_studio/oxalys80/rules.mk
Normal file
23
keyboards/nix_studio/oxalys80/rules.mk
Normal file
@@ -0,0 +1,23 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = yes # Enable RGB underglow
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
LTO_ENABLE = yes
|
||||
@@ -26,8 +26,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
[1] = LAYOUT_65_iso_blocker(
|
||||
KC_GRV, 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_DEL, KC_INS,
|
||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS,
|
||||
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
||||
),
|
||||
|
||||
@@ -19,15 +19,15 @@
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_65_iso_blocker_doublebs(
|
||||
KC_ESC, 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_BSPC, KC_HOME,
|
||||
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_RBRC, KC_NUHS, KC_PGUP,
|
||||
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_PGDN,
|
||||
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_RBRC, KC_PGUP,
|
||||
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_NUHS, KC_ENT, KC_PGDN,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[1] = LAYOUT_65_iso_blocker_doublebs(
|
||||
KC_GRV, 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_DEL, KC_DEL, KC_INS,
|
||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_GRV, 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_DEL, KC_DEL, KC_INS,
|
||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NUHS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS,
|
||||
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
||||
),
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
K40, K41, K42, K46, K4A, K4B, K4D, K4E, K4F \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \
|
||||
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K2D, K1F }, \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \
|
||||
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K2D, K1F }, \
|
||||
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E, K2F }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \
|
||||
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \
|
||||
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \
|
||||
}
|
||||
#define LAYOUT_65_ansi_blocker_doublebs( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
|
||||
@@ -72,15 +72,15 @@
|
||||
}
|
||||
#define LAYOUT_65_iso_blocker_doublebs( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
|
||||
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \
|
||||
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, \
|
||||
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \
|
||||
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \
|
||||
K40, K41, K42, K46, K4A, K4B, K4D, K4E, K4F \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
|
||||
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
|
||||
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E, K2F }, \
|
||||
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K2D, K1F }, \
|
||||
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E, K2F }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \
|
||||
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \
|
||||
}
|
||||
|
||||
197
keyboards/ploopyco/adns5050.c
Normal file
197
keyboards/ploopyco/adns5050.c
Normal file
@@ -0,0 +1,197 @@
|
||||
/* Copyright 2021 Colin Lam (Ploopy Corporation)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
* Copyright 2019 Sunjun Kim
|
||||
* Copyright 2019 Hiroyuki Okada
|
||||
*
|
||||
* 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 "adns5050.h"
|
||||
#include "quantum.h"
|
||||
#include "wait.h"
|
||||
|
||||
#ifdef CONSOLE_ENABLE
|
||||
# include "print.h"
|
||||
#endif
|
||||
|
||||
#ifndef OPTIC_ROTATED
|
||||
# define OPTIC_ROTATED false
|
||||
#endif
|
||||
|
||||
// Definitions for the ADNS serial line.
|
||||
// These really ought to be defined in your config.h, but defaults are
|
||||
// here if you're really lazy.
|
||||
#ifndef ADNS_SCLK_PIN
|
||||
# define ADNS_SCLK_PIN B7
|
||||
#endif
|
||||
|
||||
#ifndef ADNS_SDIO_PIN
|
||||
# define ADNS_SDIO_PIN C6
|
||||
#endif
|
||||
|
||||
#ifndef ADNS_CS_PIN
|
||||
# define ADNS_CS_PIN B4
|
||||
#endif
|
||||
|
||||
#ifdef CONSOLE_ENABLE
|
||||
void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); }
|
||||
#endif
|
||||
|
||||
// Initialize the ADNS serial pins.
|
||||
void adns_init(void) {
|
||||
setPinOutput(ADNS_SCLK_PIN);
|
||||
setPinOutput(ADNS_SDIO_PIN);
|
||||
setPinOutput(ADNS_CS_PIN);
|
||||
}
|
||||
|
||||
// Perform a synchronization with the ADNS.
|
||||
// Just as with the serial protocol, this is used by the slave to send a
|
||||
// synchronization signal to the master.
|
||||
void adns_sync(void) {
|
||||
writePinLow(ADNS_CS_PIN);
|
||||
wait_us(1);
|
||||
writePinHigh(ADNS_CS_PIN);
|
||||
}
|
||||
|
||||
void adns_cs_select(void) {
|
||||
writePinLow(ADNS_CS_PIN);
|
||||
}
|
||||
|
||||
void adns_cs_deselect(void) {
|
||||
writePinHigh(ADNS_CS_PIN);
|
||||
}
|
||||
|
||||
uint8_t adns_serial_read(void) {
|
||||
setPinInput(ADNS_SDIO_PIN);
|
||||
uint8_t byte = 0;
|
||||
|
||||
for (uint8_t i = 0; i < 8; ++i) {
|
||||
writePinLow(ADNS_SCLK_PIN);
|
||||
wait_us(1);
|
||||
|
||||
byte = (byte << 1) | readPin(ADNS_SDIO_PIN);
|
||||
|
||||
writePinHigh(ADNS_SCLK_PIN);
|
||||
wait_us(1);
|
||||
}
|
||||
|
||||
return byte;
|
||||
}
|
||||
|
||||
void adns_serial_write(uint8_t data) {
|
||||
setPinOutput(ADNS_SDIO_PIN);
|
||||
|
||||
for (int8_t b = 7; b >= 0; b--) {
|
||||
writePinLow(ADNS_SCLK_PIN);
|
||||
|
||||
if (data & (1 << b))
|
||||
writePinHigh(ADNS_SDIO_PIN);
|
||||
else
|
||||
writePinLow(ADNS_SDIO_PIN);
|
||||
|
||||
wait_us(2);
|
||||
|
||||
writePinHigh(ADNS_SCLK_PIN);
|
||||
}
|
||||
|
||||
// tSWR. See page 15 of the ADNS spec sheet.
|
||||
// Technically, this is only necessary if the next operation is an SDIO
|
||||
// read. This is not guaranteed to be the case, but we're being lazy.
|
||||
wait_us(4);
|
||||
|
||||
// Note that tSWW is never necessary. All write operations require at
|
||||
// least 32us, which exceeds tSWW, so there's never a need to wait for it.
|
||||
}
|
||||
|
||||
// Read a byte of data from a register on the ADNS.
|
||||
// Don't forget to use the register map (as defined in the header file).
|
||||
uint8_t adns_read_reg(uint8_t reg_addr) {
|
||||
adns_cs_select();
|
||||
|
||||
adns_serial_write(reg_addr);
|
||||
|
||||
// We don't need a minimum tSRAD here. That's because a 4ms wait time is
|
||||
// already included in adns_serial_write(), so we're good.
|
||||
// See page 10 and 15 of the ADNS spec sheet.
|
||||
//wait_us(4);
|
||||
|
||||
uint8_t byte = adns_serial_read();
|
||||
|
||||
// tSRW & tSRR. See page 15 of the ADNS spec sheet.
|
||||
// Technically, this is only necessary if the next operation is an SDIO
|
||||
// read or write. This is not guaranteed to be the case.
|
||||
// Honestly, this wait could probably be removed.
|
||||
wait_us(1);
|
||||
|
||||
adns_cs_deselect();
|
||||
|
||||
return byte;
|
||||
}
|
||||
|
||||
void adns_write_reg(uint8_t reg_addr, uint8_t data) {
|
||||
adns_cs_select();
|
||||
adns_serial_write(reg_addr);
|
||||
adns_serial_write(data);
|
||||
adns_cs_deselect();
|
||||
}
|
||||
|
||||
report_adns_t adns_read_burst(void) {
|
||||
adns_cs_select();
|
||||
|
||||
report_adns_t data;
|
||||
data.dx = 0;
|
||||
data.dy = 0;
|
||||
|
||||
adns_serial_write(REG_MOTION_BURST);
|
||||
|
||||
// We don't need a minimum tSRAD here. That's because a 4ms wait time is
|
||||
// already included in adns_serial_write(), so we're good.
|
||||
// See page 10 and 15 of the ADNS spec sheet.
|
||||
//wait_us(4);
|
||||
|
||||
uint8_t x = adns_serial_read();
|
||||
uint8_t y = adns_serial_read();
|
||||
|
||||
// Burst mode returns a bunch of other shit that we don't really need.
|
||||
// Setting CS to high ends burst mode early.
|
||||
adns_cs_deselect();
|
||||
|
||||
data.dx = convert_twoscomp(x);
|
||||
data.dy = convert_twoscomp(y);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
// Convert a two's complement byte from an unsigned data type into a signed
|
||||
// data type.
|
||||
int8_t convert_twoscomp(uint8_t data) {
|
||||
if ((data & 0x80) == 0x80)
|
||||
return -128 + (data & 0x7F);
|
||||
else
|
||||
return data;
|
||||
}
|
||||
|
||||
// Don't forget to use the definitions for CPI in the header file.
|
||||
void adns_set_cpi(uint8_t cpi) {
|
||||
adns_write_reg(REG_MOUSE_CONTROL2, cpi);
|
||||
}
|
||||
|
||||
bool adns_check_signature(void) {
|
||||
uint8_t pid = adns_read_reg(REG_PRODUCT_ID);
|
||||
uint8_t rid = adns_read_reg(REG_REVISION_ID);
|
||||
uint8_t pid2 = adns_read_reg(REG_PRODUCT_ID2);
|
||||
|
||||
return (pid == 0x12 && rid == 0x01 && pid2 == 0x26);
|
||||
}
|
||||
79
keyboards/ploopyco/adns5050.h
Normal file
79
keyboards/ploopyco/adns5050.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/* Copyright 2021 Colin Lam (Ploopy Corporation)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
* Copyright 2019 Sunjun Kim
|
||||
* Copyright 2019 Hiroyuki Okada
|
||||
*
|
||||
* 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
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
// Registers
|
||||
#define REG_PRODUCT_ID 0x00
|
||||
#define REG_REVISION_ID 0x01
|
||||
#define REG_MOTION 0x02
|
||||
#define REG_DELTA_X 0x03
|
||||
#define REG_DELTA_Y 0x04
|
||||
#define REG_SQUAL 0x05
|
||||
#define REG_SHUTTER_UPPER 0x06
|
||||
#define REG_SHUTTER_LOWER 0x07
|
||||
#define REG_MAXIMUM_PIXEL 0x08
|
||||
#define REG_PIXEL_SUM 0x09
|
||||
#define REG_MINIMUM_PIXEL 0x0a
|
||||
#define REG_PIXEL_GRAB 0x0b
|
||||
#define REG_MOUSE_CONTROL 0x0d
|
||||
#define REG_MOUSE_CONTROL2 0x19
|
||||
#define REG_LED_DC_MODE 0x22
|
||||
#define REG_CHIP_RESET 0x3a
|
||||
#define REG_PRODUCT_ID2 0x3e
|
||||
#define REG_INV_REV_ID 0x3f
|
||||
#define REG_MOTION_BURST 0x63
|
||||
|
||||
// CPI values
|
||||
#define CPI125 0x11
|
||||
#define CPI250 0x12
|
||||
#define CPI375 0x13
|
||||
#define CPI500 0x14
|
||||
#define CPI625 0x15
|
||||
#define CPI750 0x16
|
||||
#define CPI875 0x17
|
||||
#define CPI1000 0x18
|
||||
#define CPI1125 0x19
|
||||
#define CPI1250 0x1a
|
||||
#define CPI1375 0x1b
|
||||
|
||||
#ifdef CONSOLE_ENABLE
|
||||
void print_byte(uint8_t byte);
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int8_t dx;
|
||||
int8_t dy;
|
||||
} report_adns_t;
|
||||
|
||||
// A bunch of functions to implement the ADNS5050-specific serial protocol.
|
||||
// Note that the "serial.h" driver is insufficient, because it does not
|
||||
// manually manipulate a serial clock signal.
|
||||
void adns_init(void);
|
||||
void adns_sync(void);
|
||||
uint8_t adns_serial_read(void);
|
||||
void adns_serial_write(uint8_t data);
|
||||
uint8_t adns_read_reg(uint8_t reg_addr);
|
||||
void adns_write_reg(uint8_t reg_addr, uint8_t data);
|
||||
report_adns_t adns_read_burst(void);
|
||||
int8_t convert_twoscomp(uint8_t data);
|
||||
void adns_set_cpi(uint8_t cpi);
|
||||
bool adns_check_signature(void);
|
||||
59
keyboards/ploopyco/trackball_mini/config.h
Normal file
59
keyboards/ploopyco/trackball_mini/config.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/* Copyright 2021 Colin Lam (Ploopy Corporation)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
* Copyright 2019 Sunjun Kim
|
||||
* Copyright 2019 Hiroyuki Okada
|
||||
*
|
||||
* 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
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x5043
|
||||
#define PRODUCT_ID 0x1EAB
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER PloopyCo
|
||||
#define PRODUCT Trackball Mini
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 1
|
||||
#define MATRIX_COLS 5
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/* Much more so than a keyboard, speed matters for a mouse. So we'll go for as high
|
||||
a polling rate as possible. */
|
||||
#define USB_POLLING_INTERVAL_MS 1
|
||||
#define USB_MAX_POWER_CONSUMPTION 100
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
#define BOOTMAGIC_LITE_ROW 0
|
||||
#define BOOTMAGIC_LITE_COLUMN 3
|
||||
|
||||
// If board has a debug LED, you can enable it by defining this
|
||||
// #define DEBUG_LED_PIN F7
|
||||
19
keyboards/ploopyco/trackball_mini/info.json
Normal file
19
keyboards/ploopyco/trackball_mini/info.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"keyboard_name": "Ploopy Trackball Mini",
|
||||
"url": "www.ploopy.co",
|
||||
"maintainer": "ploopyco",
|
||||
"manufacturer": "Ploopy Corporation",
|
||||
"width": 8,
|
||||
"height": 3,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x":0, "y":0, "h":2},
|
||||
{"x":1, "y":0.25, "h":1.5},
|
||||
{"x":2, "y":0, "h":2},
|
||||
{"x":3.5, "y":0, "h":2},
|
||||
{"x":4.5, "y":0, "h":2}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
28
keyboards/ploopyco/trackball_mini/keymaps/default/keymap.c
Normal file
28
keyboards/ploopyco/trackball_mini/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/* Copyright 2021 Colin Lam (Ploopy Corporation)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
* Copyright 2019 Sunjun Kim
|
||||
* Copyright 2019 Hiroyuki Okada
|
||||
*
|
||||
* 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
|
||||
|
||||
// safe range starts at `PLOOPY_SAFE_RANGE` instead.
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT( /* Base */
|
||||
KC_BTN1, KC_BTN3, KC_BTN2,
|
||||
KC_BTN4, KC_BTN5
|
||||
),
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
The default keymap for the Ploopy Trackball Mini.
|
||||
|
||||
Note that kits bought from PloopyCo actually ship with the VIA keymap, not this one.
|
||||
@@ -0,0 +1,66 @@
|
||||
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
* Copyright 2019 Sunjun Kim
|
||||
* Copyright 2020 Ploopy Corporation
|
||||
*
|
||||
* 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
|
||||
|
||||
// used for tracking the state
|
||||
bool is_drag_scroll = false;
|
||||
|
||||
enum custom_keycodes {
|
||||
DRAG_SCROLL = PLOOPY_SAFE_RANGE,
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case DRAG_SCROLL:
|
||||
if (record->event.pressed) {
|
||||
// this toggles the state each time you tap it
|
||||
is_drag_scroll ^= 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// The real magic is here.
|
||||
// This function is called to translate the processed sensor movement
|
||||
// from the mouse sensor and translates it into x and y movement for
|
||||
// the mouse report. Normally. So if "drag scroll" is toggled on,
|
||||
// moving the ball scrolls instead. You could remove the x or y here
|
||||
// to only scroll in one direction, if you wanted, as well. In fact,
|
||||
// there is no reason that you need to send this to the mouse report.
|
||||
// You could have it register a key, instead.
|
||||
void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
|
||||
if (is_drag_scroll) {
|
||||
mouse_report->h = x;
|
||||
mouse_report->v = y;
|
||||
} else {
|
||||
mouse_report->x = x;
|
||||
mouse_report->y = y;
|
||||
}
|
||||
}
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT( /* Base */
|
||||
KC_BTN1, KC_BTN3, KC_BTN2,
|
||||
KC_BTN4, LT(1, KC_BTN5)
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
DRAG_SCROLL, _______, _______,
|
||||
_______, _______
|
||||
)
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
# The Drag Scroll keymap for the Ploopy Trackball Mini
|
||||
|
||||
This is a sample keymap showing off what you can do with the custom callback drivers.
|
||||
|
||||
This particular example enables "drag scrolling". The movement of the ball is used to scroll up and down.
|
||||
21
keyboards/ploopyco/trackball_mini/keymaps/via/config.h
Normal file
21
keyboards/ploopyco/trackball_mini/keymaps/via/config.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
* Copyright 2019 Sunjun Kim
|
||||
* Copyright 2020 Ploopy Corporation
|
||||
*
|
||||
* 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
|
||||
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
|
||||
30
keyboards/ploopyco/trackball_mini/keymaps/via/keymap.c
Normal file
30
keyboards/ploopyco/trackball_mini/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
* Copyright 2019 Sunjun Kim
|
||||
* Copyright 2020 Ploopy Corporation
|
||||
*
|
||||
* 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
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT( KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN5 ),
|
||||
[1] = LAYOUT( _______, _______, _______, _______, _______ ),
|
||||
[2] = LAYOUT( _______, _______, _______, _______, _______ ),
|
||||
[3] = LAYOUT( _______, _______, _______, _______, _______ ),
|
||||
[4] = LAYOUT( _______, _______, _______, _______, _______ ),
|
||||
[5] = LAYOUT( _______, _______, _______, _______, _______ ),
|
||||
[6] = LAYOUT( _______, _______, _______, _______, _______ ),
|
||||
[7] = LAYOUT( _______, _______, _______, _______, _______ )
|
||||
};
|
||||
1
keyboards/ploopyco/trackball_mini/keymaps/via/rules.mk
Normal file
1
keyboards/ploopyco/trackball_mini/keymaps/via/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
75
keyboards/ploopyco/trackball_mini/readme.md
Normal file
75
keyboards/ploopyco/trackball_mini/readme.md
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
# Ploopy Trackball Mini
|
||||
|
||||

|
||||
|
||||
It's a DIY, QMK Powered Trackball...Mini!
|
||||
|
||||
* Maintainer: [PloopyCo](https://github.com/ploopyco)
|
||||
* Key contributors: [Drashna Jael're](https://github.com/drashna/), [Germ](https://github.com/germ/)
|
||||
* Hardware Supported: ATMega32u4 16MHz(5v)
|
||||
* Hardware Availability: [Store](https://ploopy.co), [GitHub](https://github.com/ploopyco)
|
||||
|
||||
Make example for this trackball (after setting up your build environment):
|
||||
|
||||
make ploopyco/trackball_mini/rev1_001:default:flash
|
||||
make ploopyco/trackball_mini/rev1_001:via:flash
|
||||
|
||||
To jump to the bootloader, hold down "Button 4" (immediate right of the ball)
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
## Hardware Reset Button
|
||||
|
||||
The Ploopy Mini has a handy bootloader reset mechanism: two via pins on the board, designated by the reference designator `MCU.J.X BOOTLOADER`. If you stick an uninsulated paperclip or a pair of metal tweezers into both holes and plug in the Mini, it will start in bootloader mode.
|
||||
|
||||
## Revisions
|
||||
|
||||
Occasionally, new revisions of the PCB will be released. Every board comes with a designator that looks something like `R1.001`.
|
||||
|
||||
Match the firmware that you flash onto the board with the designator on the board.
|
||||
|
||||
# Customzing your Ploopy Mini Trackball
|
||||
|
||||
While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change, such as adding DPI control, or using the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse sensor.
|
||||
|
||||
The default behavior for this is:
|
||||
|
||||
```c
|
||||
void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) {
|
||||
mouse_report->h = h;
|
||||
mouse_report->v = v;
|
||||
}
|
||||
|
||||
void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
|
||||
mouse_report->x = x;
|
||||
mouse_report->y = y;
|
||||
}
|
||||
```
|
||||
|
||||
This should allow you to more heavily customize the behavior.
|
||||
|
||||
Alternatively, the `process_wheel` and `process_mouse` functions can both be replaced too, to allow for even more functionality.
|
||||
|
||||
Additionally, you can change the DPI/CPI or speed of the trackball by calling `adns_set_cpi` at any time. Additionally, there is a `DPI_CONFIG` macro that will cycle through an array of options for the DPI. This is set to 375, 750, and 1375, but can be changed. 750 is the default.
|
||||
|
||||
To configure/set your own array, there are two defines to use, `PLOOPY_DPI_OPTIONS` to set the array, and `PLOOPY_DPI_DEFAULT`.
|
||||
|
||||
```c
|
||||
#define PLOOPY_DPI_OPTIONS { CPI375, CPI750, CPI1375}
|
||||
#define PLOOPY_DPI_DEFAULT 1
|
||||
```
|
||||
|
||||
The `PLOOPY_DPI_OPTIONS` array sets the values that you want to be able to cycle through, and the order they are in. The "default" define lets the firmware know which of these options is the default and should be loaded by default.
|
||||
|
||||
The `DPI_CONFIG` macro will cycle through the values in the array, each time you hit it. It stores this value in persistent memory, so it will load it the next time the device powers up.
|
||||
|
||||
## Fuse settings
|
||||
|
||||
When flashing the bootloader, use the following fuse settings:
|
||||
|
||||
| Fuse | Setting |
|
||||
|----------|-------------|
|
||||
| Low | `0x5E` |
|
||||
| High | `0x99` |
|
||||
| Extended | `0xC3` |
|
||||
40
keyboards/ploopyco/trackball_mini/rev1_001/config.h
Normal file
40
keyboards/ploopyco/trackball_mini/rev1_001/config.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/* Copyright 2021 Colin Lam (Ploopy Corporation)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
* Copyright 2019 Sunjun Kim
|
||||
* Copyright 2019 Hiroyuki Okada
|
||||
*
|
||||
* 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
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define DIRECT_PINS \
|
||||
{ \
|
||||
{ D4, D2, E6, D7, B6 } \
|
||||
}
|
||||
|
||||
// These pins are not broken out, and cannot be used normally.
|
||||
// They are set as output and pulled high, by default
|
||||
#define UNUSED_PINS \
|
||||
{ B5, C7, D0, D1, D3, D5, D6, F1, F3, F5, F6, F7 }
|
||||
1
keyboards/ploopyco/trackball_mini/rev1_001/readme.md
Normal file
1
keyboards/ploopyco/trackball_mini/rev1_001/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
See the main readme for more details. This is just here for when future revisions are released.
|
||||
22
keyboards/ploopyco/trackball_mini/rev1_001/rev1_001.h
Normal file
22
keyboards/ploopyco/trackball_mini/rev1_001/rev1_001.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/* Copyright 2021 Colin Lam (Ploopy Corporation)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
* Copyright 2019 Sunjun Kim
|
||||
* Copyright 2019 Hiroyuki Okada
|
||||
*
|
||||
* 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
|
||||
|
||||
#include "trackball_mini.h"
|
||||
0
keyboards/ploopyco/trackball_mini/rev1_001/rules.mk
Normal file
0
keyboards/ploopyco/trackball_mini/rev1_001/rules.mk
Normal file
32
keyboards/ploopyco/trackball_mini/rules.mk
Normal file
32
keyboards/ploopyco/trackball_mini/rules.mk
Normal file
@@ -0,0 +1,32 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency
|
||||
F_CPU = 16000000
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
POINTING_DEVICE_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += adns5050.c opt_encoder.c
|
||||
|
||||
DEFAULT_FOLDER = ploopyco/trackball_mini/rev1_001
|
||||
235
keyboards/ploopyco/trackball_mini/trackball_mini.c
Normal file
235
keyboards/ploopyco/trackball_mini/trackball_mini.c
Normal file
@@ -0,0 +1,235 @@
|
||||
/* Copyright 2021 Colin Lam (Ploopy Corporation)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
* Copyright 2019 Sunjun Kim
|
||||
* Copyright 2019 Hiroyuki Okada
|
||||
*
|
||||
* 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 "trackball_mini.h"
|
||||
|
||||
#ifndef OPT_DEBOUNCE
|
||||
# define OPT_DEBOUNCE 5 // (ms) Time between scroll events
|
||||
#endif
|
||||
|
||||
#ifndef SCROLL_BUTT_DEBOUNCE
|
||||
# define SCROLL_BUTT_DEBOUNCE 100 // (ms) Time between scroll events
|
||||
#endif
|
||||
|
||||
#ifndef OPT_THRES
|
||||
# define OPT_THRES 150 // (0-1024) Threshold for actication
|
||||
#endif
|
||||
|
||||
#ifndef OPT_SCALE
|
||||
# define OPT_SCALE 1 // Multiplier for wheel
|
||||
#endif
|
||||
|
||||
#ifndef PLOOPY_DPI_OPTIONS
|
||||
# define PLOOPY_DPI_OPTIONS { CPI375, CPI750, CPI1375 }
|
||||
# ifndef PLOOPY_DPI_DEFAULT
|
||||
# define PLOOPY_DPI_DEFAULT 2
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PLOOPY_DPI_DEFAULT
|
||||
# define PLOOPY_DPI_DEFAULT 1
|
||||
#endif
|
||||
|
||||
// Transformation constants for delta-X and delta-Y
|
||||
const static float ADNS_X_TRANSFORM = -1.0;
|
||||
const static float ADNS_Y_TRANSFORM = 1.0;
|
||||
|
||||
keyboard_config_t keyboard_config;
|
||||
uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS;
|
||||
#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t))
|
||||
|
||||
// TODO: Implement libinput profiles
|
||||
// https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html
|
||||
// Compile time accel selection
|
||||
// Valid options are ACC_NONE, ACC_LINEAR, ACC_CUSTOM, ACC_QUADRATIC
|
||||
|
||||
// Trackball State
|
||||
bool is_scroll_clicked = false;
|
||||
bool BurstState = false; // init burst state for Trackball module
|
||||
uint16_t MotionStart = 0; // Timer for accel, 0 is resting state
|
||||
uint16_t lastScroll = 0; // Previous confirmed wheel event
|
||||
uint16_t lastMidClick = 0; // Stops scrollwheel from being read if it was pressed
|
||||
uint8_t OptLowPin = OPT_ENC1;
|
||||
bool debug_encoder = false;
|
||||
|
||||
__attribute__((weak)) void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) {
|
||||
mouse_report->h = h;
|
||||
mouse_report->v = v;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) {
|
||||
// If the mouse wheel was just released, do not scroll.
|
||||
if (timer_elapsed(lastMidClick) < SCROLL_BUTT_DEBOUNCE)
|
||||
return;
|
||||
|
||||
// Limit the number of scrolls per unit time.
|
||||
if (timer_elapsed(lastScroll) < OPT_DEBOUNCE)
|
||||
return;
|
||||
|
||||
// Don't scroll if the middle button is depressed.
|
||||
if (is_scroll_clicked) {
|
||||
#ifndef IGNORE_SCROLL_CLICK
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
lastScroll = timer_read();
|
||||
uint16_t p1 = adc_read(OPT_ENC1_MUX);
|
||||
uint16_t p2 = adc_read(OPT_ENC2_MUX);
|
||||
|
||||
if (debug_encoder)
|
||||
dprintf("OPT1: %d, OPT2: %d\n", p1, p2);
|
||||
|
||||
uint8_t dir = opt_encoder_handler(p1, p2);
|
||||
|
||||
if (dir == 0)
|
||||
return;
|
||||
|
||||
process_wheel_user(mouse_report, mouse_report->h, (int)(mouse_report->v + (dir * OPT_SCALE)));
|
||||
}
|
||||
|
||||
__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
|
||||
// x and y are swapped
|
||||
// the sensor is rotated
|
||||
// by 90 degrees
|
||||
int16_t temp = x;
|
||||
x = y;
|
||||
y = temp;
|
||||
|
||||
// Apply delta-X and delta-Y transformations.
|
||||
float xt = (float) x * ADNS_X_TRANSFORM;
|
||||
float yt = (float) y * ADNS_Y_TRANSFORM;
|
||||
|
||||
int16_t xti = xt;
|
||||
int16_t yti = yt;
|
||||
|
||||
mouse_report->x = xti;
|
||||
mouse_report->y = yti;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) {
|
||||
report_adns_t data = adns_read_burst();
|
||||
|
||||
if (data.dx != 0 || data.dy != 0) {
|
||||
if (debug_mouse)
|
||||
dprintf("Raw ] X: %d, Y: %d\n", data.dx, data.dy);
|
||||
|
||||
process_mouse_user(mouse_report, data.dx, data.dy);
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
||||
xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||
|
||||
// Update Timer to prevent accidental scrolls
|
||||
if ((record->event.key.col == 1) && (record->event.key.row == 0)) {
|
||||
lastMidClick = timer_read();
|
||||
is_scroll_clicked = record->event.pressed;
|
||||
}
|
||||
|
||||
if (!process_record_user(keycode, record))
|
||||
return false;
|
||||
|
||||
if (keycode == DPI_CONFIG && record->event.pressed) {
|
||||
keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE;
|
||||
eeconfig_update_kb(keyboard_config.raw);
|
||||
adns_set_cpi(dpi_array[keyboard_config.dpi_config]);
|
||||
}
|
||||
|
||||
/* If Mousekeys is disabled, then use handle the mouse button
|
||||
* keycodes. This makes things simpler, and allows usage of
|
||||
* the keycodes in a consistent manner. But only do this if
|
||||
* Mousekeys is not enable, so it's not handled twice.
|
||||
*/
|
||||
#ifndef MOUSEKEY_ENABLE
|
||||
if (IS_MOUSEKEY_BUTTON(keycode)) {
|
||||
report_mouse_t currentReport = pointing_device_get_report();
|
||||
if (record->event.pressed) {
|
||||
currentReport.buttons |= 1 << (keycode - KC_MS_BTN1);
|
||||
} else {
|
||||
currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1));
|
||||
}
|
||||
pointing_device_set_report(currentReport);
|
||||
pointing_device_send();
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Hardware Setup
|
||||
void keyboard_pre_init_kb(void) {
|
||||
// debug_enable = true;
|
||||
// debug_matrix = true;
|
||||
debug_mouse = true;
|
||||
// debug_encoder = true;
|
||||
|
||||
setPinInput(OPT_ENC1);
|
||||
setPinInput(OPT_ENC2);
|
||||
|
||||
/* Ground all output pins connected to ground. This provides additional
|
||||
* pathways to ground. If you're messing with this, know this: driving ANY
|
||||
* of these pins high will cause a short. On the MCU. Ka-blooey.
|
||||
*/
|
||||
#ifdef UNUSED_PINS
|
||||
const pin_t unused_pins[] = UNUSED_PINS;
|
||||
|
||||
for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) {
|
||||
setPinOutput(unused_pins[i]);
|
||||
writePinLow(unused_pins[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void pointing_device_init(void) {
|
||||
adns_init();
|
||||
opt_encoder_init();
|
||||
}
|
||||
|
||||
void pointing_device_task(void) {
|
||||
report_mouse_t mouse_report = pointing_device_get_report();
|
||||
process_wheel(&mouse_report);
|
||||
process_mouse(&mouse_report);
|
||||
pointing_device_set_report(mouse_report);
|
||||
pointing_device_send();
|
||||
}
|
||||
|
||||
void eeconfig_init_kb(void) {
|
||||
keyboard_config.dpi_config = PLOOPY_DPI_DEFAULT;
|
||||
eeconfig_update_kb(keyboard_config.raw);
|
||||
eeconfig_init_user();
|
||||
}
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// is safe to just read DPI setting since matrix init
|
||||
// comes before pointing device init.
|
||||
keyboard_config.raw = eeconfig_read_kb();
|
||||
if (keyboard_config.dpi_config > DPI_OPTION_SIZE) {
|
||||
eeconfig_init_kb();
|
||||
}
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void keyboard_post_init_kb(void) {
|
||||
adns_set_cpi(dpi_array[keyboard_config.dpi_config]);
|
||||
|
||||
keyboard_post_init_user();
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user