diff options
Diffstat (limited to 'keyboards/splitkb/kyria/keymaps/taamas2')
-rw-r--r-- | keyboards/splitkb/kyria/keymaps/taamas2/config.h | 141 | ||||
-rw-r--r-- | keyboards/splitkb/kyria/keymaps/taamas2/keymap.c | 336 | ||||
-rw-r--r-- | keyboards/splitkb/kyria/keymaps/taamas2/rules.mk | 13 |
3 files changed, 490 insertions, 0 deletions
diff --git a/keyboards/splitkb/kyria/keymaps/taamas2/config.h b/keyboards/splitkb/kyria/keymaps/taamas2/config.h new file mode 100644 index 0000000000..b276b5a59d --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/taamas2/config.h @@ -0,0 +1,141 @@ +/* +Copyright 2022 Thomas Baart <thomas@splitkb.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 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8D1D +#define PRODUCT_ID 0x9D9D +#define DEVICE_VER 0x0002 +#define MANUFACTURER splitkb +#define PRODUCT Kyria rev2 + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +// wiring +#define MATRIX_ROW_PINS \ + { F6, F7, B1, B3 } +#define MATRIX_COL_PINS \ + { B2, B6, B5, B4, E6, D7, C6, D4 } +#define MATRIX_ROW_PINS_RIGHT \ + { D4, C6, D7, E6 } +#define MATRIX_COL_PINS_RIGHT \ + { B4, B5, B6, B2, B3, B1, F7, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// Side detection +// col 4 row 3 on right-hand-side +#define SPLIT_HAND_MATRIX_GRID E6, B3 // row first because the board is col2row +#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT +#define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `rev2.c` + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ + +#if defined(CONVERT_TO_PROTON_C) +# define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +# define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. +# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 +# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +# define SERIAL_USART_TX_PIN D3 +# define SERIAL_USART_RX_PIN D2 + +# define RGB_DI_PIN PAL_LINE(GPIOA, 3) +# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 +# define WS2812_PWM_CHANNEL 4 // default: 2 +# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 +# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. +#else +# define RGB_DI_PIN D3 +# define SOFT_SERIAL_PIN D2 +#endif + +#ifdef OLED_ENABLE +# define OLED_DISPLAY_128X64 +# define SPLIT_OLED_ENABLE +#endif + +/* RGB matrix support */ +#ifdef RGB_MATRIX_ENABLE +# define SPLIT_TRANSPORT_MIRROR +# define DRIVER_LED_TOTAL RGBLED_NUM // Number of LEDs +# define RGB_MATRIX_SPLIT { 10, 10 } +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 170 +# define RGB_DISABLE_WHEN_USB_SUSPENDED +#endif + +// Personal or edited stuff here + +// Lets you roll mod-tap keys +// Which is something I don't want: a +// quick Alt+a don't work if this is defined +//#define IGNORE_MOD_TAP_INTERRUPT + +// Encoder settings + +#define ENCODER_RESOLUTION 2 + +// Mouse settings + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 50 +#define MOUSEKEY_MAX_SPEED 20 +#define MOUSEKEY_TIME_TO_MAX 20 + +// Led settings + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 16 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 + #define RGBLIGHT_SLEEP + //#define RGBLIGHT_SPLIT + #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_LIGHT // default RGBLIGHT_MODE_STATIC_LIGHT + #define RGBLIGHT_DEFAULT_HUE 180 // default 0 + #define RGBLIGHT_DEFAULT_SAT 255 // default 255 + #define RGBLIGHT_DEFAULT_VAL 100 // default RGBLIGHT_LIMIT_VAL + #define RGBLIGHT_DEFAULT_SPD 0 // default 0 + + //#define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_SNAKE + + /*#define RGBLIGHT_LED_MAP \ + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, \ + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}*/ +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// Does not work for Elite C rev4 +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/splitkb/kyria/keymaps/taamas2/keymap.c b/keyboards/splitkb/kyria/keymaps/taamas2/keymap.c new file mode 100644 index 0000000000..08333a2aee --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/taamas2/keymap.c @@ -0,0 +1,336 @@ +/* Copyright 2019 Thomas Baart <thomas@splitkb.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 +#include <keymap_spanish.h> +#include <time.h> + +enum layers { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, + _GAMING, + _NUM_L +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | ' ? | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | ESC | A | S | D | F | G | | H | J | K | L | Ñ | ´ ¨ | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | < > | Z | X | C | V | B | NumsL|NLAlt | |KeyLck|CapsLk| N | M | , ; | . : | - _ | " | + * | LShift | | | | | | | | |CtrAlt|SperSh| | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * |Del | | Space| Enter| Esc | | Bksp | App | ` | Tab | Space| + * |LShift| Lower| | Ctrl | Alt | |LShift| Super| AltGr| Raise| RCtrl| + * `----------------------------------' `----------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, ES_QUOT, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, ES_NTIL, ES_ACUT, + MT(MOD_LSFT, ES_LABK), KC_Z, KC_X, KC_C, KC_V, KC_B, OSL(_NUM_L), LM(_NUM_L, MOD_LALT), LCA_T(KC_LOCK), SGUI_T(KC_CAPS), KC_N, KC_M, ES_COMM, ES_DOT, ES_MINS, ES_DQUO, + MT(MOD_LSFT, KC_DEL), MO(_LOWER), KC_SPC, MT(MOD_LCTL, KC_ENT), MT(MOD_LALT, KC_ESC), + MT(MOD_LSFT, KC_BSPC), MT(MOD_LGUI, KC_APP), MT(MOD_RALT, ES_GRV), LT(_RAISE, KC_TAB), RCTL_T(KC_SPC) + ), + +/* + * Lower Layer: Symbols and numbers + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | + | @ | ( | ) | $ | | & | 7 | 8 | 9 | ¡ | ! | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | * | / | { | } | # | | 0 | 4 | 5 | 6 | ¿ | ? | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | \ | ^ | % | [ | ] | ~ | | | | | | | | 1 | 2 | 3 | = | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + _______, ES_PLUS, ES_AT, ES_LPRN, ES_RPRN, ES_DLR, ES_AMPR, KC_7, KC_8, KC_9, ES_IEXL, ES_EXLM, + _______, ES_ASTR, ES_SLSH, ES_LCBR, ES_RCBR, ES_HASH, ES_0, KC_4, KC_5, KC_6, ES_IQUE, ES_QUES, + ES_BSLS, ES_CIRC, ES_PERC, ES_LBRC, ES_RBRC, ES_TILD, _______, _______, _______, _______, ES_PIPE, KC_1, KC_2, KC_3, ES_EQL, KC_MINS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + * Raise Layer: Media, navigation + * + * ,-------------------------------------------. ,-------------------------------------------. + * | |WheelU|Mouse1|MouseU|Mouse2|Mouse3| | Prev | Stop | Play | Next |WheelU| Gaming | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | |WheelD|MouseL|MouseD|MouseR| VolUp| | Left | Down | Up | Right|WheelD| Mouse3 | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | Acc0 | Acc1 | Acc2 | Mute | VolDn| BriD | BriU | | | | MLeft| Mdown| MUp |MRight|Mouse1| Mouse2 | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_WH_U, TO(_GAMING), + _______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_WH_D, KC_BTN3, + _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_MUTE, KC_VOLD, KC_BRID, KC_BRIU, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, KC_BTN2, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + * Adjust Layer: Function keys, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | |RecMc1|PMac1 |RecMc2|PMac2 |RecStp| | | F7 | F8 | F9 | F12 |QmkMake | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | TOG | SAI | HUI | VAI | MOD | | | F4 | F5 | F6 | F11 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | SAD | HUD | VAD | RMOD | | | | | | | F1 | F2 | F3 | F10 | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, DM_REC1, DM_PLY1, DM_REC2, DM_PLY2, DM_RSTP, _______, KC_F7, KC_F8, KC_F9, KC_F12, QK_MAKE, + _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + * Gaming Layer: For left hand on keyboard and right hand on mouse + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | Q | W | E | R | | | | | | | Qwerty | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | ESC | Ctrl | A | S | D | F | | | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | Shft | Z | X | C | V | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | NumsL| | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_GAMING] = LAYOUT( + _______, _______, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, TO(_QWERTY), + KC_ESC, KC_LCTRL, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, + _______, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, MO(_NUM_L), _______, _______, _______, + _______, _______, _______, _______, _______ + ), + +/* + * Numbers on left Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | 7 | 8 | 9 | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | 0 | 4 | S | 6 | . | | | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | 1 | 2 | 3 | , | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_NUM_L] = LAYOUT( + _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, + _______, KC_0, KC_4, KC_5, KC_6, ES_DOT, _______, _______, _______, _______, _______, _______, + _______, _______, KC_1, KC_2, KC_3, ES_COMM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x9c, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfc, 0xdc, 0xc0, 0x00, 0x00, 0x00, 0x30, + 0xe0, 0x00, 0xf0, 0xfe, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfb, 0xeb, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xf0, 0xf0, 0xb0, 0xf0, 0x70, 0x30, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, + 0x0e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x00, 0x00, 0x00, + 0x00, 0x12, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9f, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x15, 0xff, 0xf8, 0xf1, 0xff, 0xfd, 0xfd, 0xfe, 0xfd, 0x7e, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x80, 0xc0, 0x80, 0x00, 0xc8, 0xc8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xd0, 0xd0, 0xd0, 0xc0, 0xc0, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf0, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xe0, + 0xe0, 0xe3, 0xef, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x1f, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x0f, 0x1f, 0x1c, 0x1f, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x60, 0xe2, 0xf0, 0xf0, 0xf0, 0xf8, 0xdc, + 0xc0, 0xe0, 0xe0, 0x0d, 0x0f, 0x77, 0x7f, 0x1f, 0x1f, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, + 0x80, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xf8, 0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf1, 0xc0, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x11, 0xd0, 0x00, 0x01, 0x81, 0x81, 0x80, 0x80, 0x80, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, + 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xe7, 0xc7, 0x87, 0xc3, 0xf1, 0xfd, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xc0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x78, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x8f, 0x0f, 0x0f, 0xff, + 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0x83, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xc0, 0xff, 0xfe, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x80, 0x00, + 0x20, 0x20, 0x30, 0x70, 0xf0, 0xfe, 0xcf, 0x07, 0x0e, 0x00, 0x00, 0x00, 0x60, 0xd0, 0xf4, 0xe0, + 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR("Kyria rev2.1\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("Symbols\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Mouse & Media\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + case _GAMING: + oled_write_P(PSTR("Gaming\n"), false); + break; + case _NUM_L: + oled_write_P(PSTR("Numbers Left\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + led_t led_usb_state = host_keyboard_led_state(); + oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +bool oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } + return false; +} +#endif + +#ifdef ENCODER_ENABLE +int ledI = 0; +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Tab + if (clockwise) { + tap_code(KC_TAB); + } else { + tap_code(KC_TAB); + } + } + else if (index == 1) { + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + return false; +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/taamas2/rules.mk b/keyboards/splitkb/kyria/keymaps/taamas2/rules.mk new file mode 100644 index 0000000000..041bc77bf4 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/taamas2/rules.mk @@ -0,0 +1,13 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays + +ENCODER_ENABLE = yes # Enables the use of one or more encoders + +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support +RGB_MATRIX_SUPPORTED = yes + +MOUSEKEY_ENABLE = yes +KEY_LOCK_ENABLE = yes +DYNAMIC_MACRO_ENABLE = yes |