1
0
Fork 0

Remove obvious user keymaps, keyboards/{b,c}* edition. (#22693)

This commit is contained in:
Nick Brassel 2023-12-18 16:05:50 +11:00 committed by GitHub
parent f25226453f
commit d235352504
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
621 changed files with 0 additions and 40804 deletions

View file

@ -1,21 +0,0 @@
/* Copyright 2022 splitkb.com <support@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
#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_EFFECT_BREATHING
#endif

View file

@ -1,73 +0,0 @@
/* Copyright 2022 splitkb.com <support@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
enum layers {
_DEFAULT = 0,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT] = LAYOUT_split_3x6_3(
KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, S(KC_F), S(KC_E), S(KC_D), S(KC_C), S(KC_B), S(KC_A),
KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, S(KC_L), S(KC_K), S(KC_J), S(KC_I), S(KC_H), S(KC_G),
KC_M, KC_N, KC_O, KC_P, KC_Q, KC_R, S(KC_R), S(KC_Q), S(KC_P), S(KC_O), S(KC_N), S(KC_M),
KC_S, KC_T, KC_U, S(KC_U), S(KC_T), S(KC_S)
)
};
#ifdef RGBLIGHT_ENABLE
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom(); // enables RGB, without saving settings
rgblight_sethsv_noeeprom(HSV_RED); // sets the color to red without saving
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving
}
#endif
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
// 0 is left-half encoder,
// 1 is right-half encoder
if (index == 0) {
tap_code(KC_0);
} else if (index == 1) {
tap_code(KC_1);
}
if (clockwise) {
tap_code16(KC_PLUS);
} else {
tap_code(KC_MINUS);
}
return false;
}
#endif
#ifdef OLED_ENABLE
bool oled_task_user(void) {
// A 128x32 OLED rotated 90 degrees is 5 characters wide and 16 characters tall
// This example string should fill that neatly
const char *text = PSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%^&*()[]{}-=_+?");
if (is_keyboard_master()) {
oled_write_P(text, false);
} else {
oled_write_P(text, false);
}
return false;
}
#endif

View file

@ -1,24 +0,0 @@
# Aurora Corne's Debug Keymap
To make debugging your build as easy as possible, we have provided a special debugging keymap. It is not intended to actually type on, it is just here to make sure that your hardware is working correctly.
## Keys
![Keys](https://i.imgur.com/y5zWjsZh.png)
The left side uses lowercase letters, the right side uses uppercase ones.
## Encoders
Encoders output a number of 0 or 1, depending on the installed position.
These correspond to the index used for custom encoder code.
The number is followed by either a `+` or a `-`, depending on the direction turned.
## LEDs
Both underglow and per-key RGB should be fading between red and off.
## OLEDs
Both the primary and secondary side should be filled with characters.

View file

@ -1,23 +0,0 @@
# Copyright 2022 splitkb.com <support@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/>.
# NOTE: These are already enabled by default at the revision level
#ENCODER_ENABLE = yes
#OLED_ENABLE = yes
# RGB Matrix is enabled at the revision level,
# while we use the regular RGB underglow for testing
RGB_MATRIX_ENABLE = no
RGBLIGHT_ENABLE = yes

View file

@ -1,19 +0,0 @@
/* Copyright 2023 splitkb.com <support@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
#define RGBLIGHT_EFFECT_BREATHING

View file

@ -1,68 +0,0 @@
/* Copyright 2023 splitkb.com <support@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
enum layers {
_DEFAULT = 0,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT] = LAYOUT(
KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, S(KC_F), S(KC_E), S(KC_D), S(KC_C), S(KC_B), S(KC_A),
KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, S(KC_L), S(KC_K), S(KC_J), S(KC_I), S(KC_H), S(KC_G),
KC_M, KC_N, KC_O, KC_P, KC_Q, KC_R, S(KC_R), S(KC_Q), S(KC_P), S(KC_O), S(KC_N), S(KC_M),
KC_S, KC_T, KC_U, KC_V, KC_W, KC_X, KC_Y, S(KC_Y), S(KC_X), S(KC_W), S(KC_V), S(KC_U), S(KC_T), S(KC_S),
KC_Z, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, S(KC_6), S(KC_5), S(KC_4), S(KC_3), S(KC_2), S(KC_1), S(KC_Z)
)
};
#ifdef RGBLIGHT_ENABLE
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom(); // enables RGB, without saving settings
rgblight_sethsv_noeeprom(HSV_RED); // sets the color to red without saving
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving
}
#endif
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
// 0 is left-half encoder
// 1 is right-half encoder
if (index == 0) {
tap_code(KC_0);
} else if (index == 1) {
tap_code(KC_1);
}
if (clockwise) {
tap_code16(KC_PLUS);
} else {
tap_code(KC_MINUS);
}
return false;
}
#endif
#ifdef OLED_ENABLE
bool oled_task_user(void) {
// A 128x32 OLED rotated 90 degrees is 5 characters wide and 16 characters tall
// This example string should fill that neatly
oled_write_P(PSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%^&*()[]{}-=_+?"), false);
return false;
}
#endif

View file

@ -1,24 +0,0 @@
# Aurora Helix's Debug Keymap
To make debugging your build as easy as possible, we have provided a special debugging keymap. It is not intended to actually type on, it is just here to make sure that your hardware is working correctly.
## Keys
![Keys](https://raw.githubusercontent.com/splitkb/qmk_firmware/assets/aurora/keymaps/debug/keys.png)
The left side uses lowercase letters, the right side uses uppercase ones.
## Encoders
Encoders output a number of 0 or 1, depending on the installed position.
These correspond to the index used for custom encoder code: the left half uses index 0, the right half uses index 1.
The number is followed by either a `+` or a `-`, depending on the direction turned.
## LEDs
Both underglow and per-key RGB should be fading between red and off.
## OLEDs
Both the primary and secondary side should be filled with characters.

View file

@ -1,8 +0,0 @@
# NOTE: These are already enabled by default at the revision level
#ENCODER_ENABLE = yes
#OLED_ENABLE = yes
# RGB Matrix is enabled at the revision level,
# while we use the regular RGB underglow for testing
RGB_MATRIX_ENABLE = no
RGBLIGHT_ENABLE = yes

View file

@ -1,21 +0,0 @@
/* Copyright 2022 splitkb.com <support@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
#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_EFFECT_BREATHING
#endif

View file

@ -1,75 +0,0 @@
/* Copyright 2022 splitkb.com <support@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
enum layers {
_DEFAULT = 0,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT] = LAYOUT(
KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, S(KC_F), S(KC_E), S(KC_D), S(KC_C), S(KC_B), S(KC_A),
KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, S(KC_L), S(KC_K), S(KC_J), S(KC_I), S(KC_H), S(KC_G),
KC_M, KC_N, KC_O, KC_P, KC_Q, KC_R, S(KC_R), S(KC_Q), S(KC_P), S(KC_O), S(KC_N), S(KC_M),
KC_S, KC_T, KC_U, KC_V, KC_W, KC_X, KC_Y, S(KC_Y), S(KC_X), S(KC_W), S(KC_V), S(KC_U), S(KC_T), S(KC_S),
KC_Z, KC_1, KC_2, KC_3, S(KC_3), S(KC_2), S(KC_1), S(KC_Z)
)
};
#ifdef RGBLIGHT_ENABLE
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom(); // enables RGB, without saving settings
rgblight_sethsv_noeeprom(HSV_RED); // sets the color to red without saving
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving
}
#endif
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
// 0 is left-half encoder
// 1 is right-half encoder
if (index == 0) {
tap_code(KC_0);
} else if (index == 1) {
tap_code(KC_1);
}
if (clockwise) {
tap_code16(KC_PLUS);
} else {
tap_code(KC_MINUS);
}
return false;
}
#endif
#ifdef OLED_ENABLE
bool oled_task_user(void) {
// A 128x32 OLED rotated 90 degrees is 5 characters wide and 16 characters tall
// This example string should fill that neatly
const char *text = PSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%^&*()[]{}-=_+?");
if (is_keyboard_master()) {
oled_write_P(text, false);
} else {
oled_write_P(text, false);
}
return false;
}
#endif

View file

@ -1,24 +0,0 @@
# Aurora Lily58's Debug Keymap
To make debugging your build as easy as possible, we have provided a special debugging keymap. It is not intended to actually type on, it is just here to make sure that your hardware is working correctly.
## Keys
![Keys](https://i.imgur.com/CF0PYu5h.png)
The left side uses lowercase letters, the right side uses uppercase ones.
## Encoders
Encoders output a number of 0 or 1, depending on the installed position.
These correspond to the index used for custom encoder code: the left half uses index 0, the right half uses index 1.
The number is followed by either a `+` or a `-`, depending on the direction turned.
## LEDs
Both underglow and per-key RGB should be fading between red and off.
## OLEDs
Both the primary and secondary side should be filled with characters.

View file

@ -1,23 +0,0 @@
# Copyright 2022 splitkb.com <support@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/>.
# NOTE: These are already enabled by default at the revision level
#ENCODER_ENABLE = yes
#OLED_ENABLE = yes
# RGB Matrix is enabled at the revision level,
# while we use the regular RGB underglow for testing
RGB_MATRIX_ENABLE = no
RGBLIGHT_ENABLE = yes

View file

@ -1,19 +0,0 @@
/* Copyright 2023 splitkb.com <support@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
#define RGBLIGHT_EFFECT_BREATHING

View file

@ -1,69 +0,0 @@
/* Copyright 2023 splitkb.com <support@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
enum layers {
_DEFAULT = 0,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT] = LAYOUT(
KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, S(KC_F), S(KC_E), S(KC_D), S(KC_C), S(KC_B), S(KC_A),
KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, S(KC_L), S(KC_K), S(KC_J), S(KC_I), S(KC_H), S(KC_G),
KC_M, KC_N, KC_O, KC_P, KC_Q, KC_R, S(KC_R), S(KC_Q), S(KC_P), S(KC_O), S(KC_N), S(KC_M),
KC_S, KC_T, KC_U, KC_V, KC_W, KC_X, KC_Y, S(KC_Y), S(KC_X), S(KC_W), S(KC_V), S(KC_U), S(KC_T), S(KC_S),
KC_Z, KC_1, KC_2, KC_3, KC_4, S(KC_4), S(KC_3), S(KC_2), S(KC_1), S(KC_Z)
)
};
#ifdef RGBLIGHT_ENABLE
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom(); // enables RGB, without saving settings
rgblight_sethsv_noeeprom(HSV_RED); // sets the color to red without saving
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving
}
#endif
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
// 0 is left-half encoder
// 1 is right-half encoder
if (index == 0) {
tap_code(KC_0);
} else if (index == 1) {
tap_code(KC_1);
}
if (clockwise) {
tap_code16(KC_PLUS);
} else {
tap_code(KC_MINUS);
}
return false;
}
#endif
#ifdef OLED_ENABLE
bool oled_task_user(void) {
// A 128x32 OLED rotated 90 degrees is 5 characters wide and 16 characters tall
// This example string should fill that neatly
oled_write_P(PSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%^&*()[]{}-=_+?"), false);
return false;
}
#endif

View file

@ -1,24 +0,0 @@
# Aurora Sofle's Debug Keymap
To make debugging your build as easy as possible, we have provided a special debugging keymap. It is not intended to actually type on, it is just here to make sure that your hardware is working correctly.
## Keys
![Keys](https://i.imgur.com/1qRAV6sh.png)
The left side uses lowercase letters, the right side uses uppercase ones.
## Encoders
Encoders output a number of 0 or 1, depending on the installed position.
These correspond to the index used for custom encoder code: the left half uses index 0, the right half uses index 1.
The number is followed by either a `+` or a `-`, depending on the direction turned.
## LEDs
Both underglow and per-key RGB should be fading between red and off.
## OLEDs
Both the primary and secondary side should be filled with characters.

View file

@ -1,8 +0,0 @@
# NOTE: These are already enabled by default at the revision level
#ENCODER_ENABLE = yes
#OLED_ENABLE = yes
# RGB Matrix is enabled at the revision level,
# while we use the regular RGB underglow for testing
RGB_MATRIX_ENABLE = no
RGBLIGHT_ENABLE = yes

View file

@ -1,21 +0,0 @@
/* Copyright 2022 splitkb.com <support@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
#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_EFFECT_BREATHING
#endif

View file

@ -1,77 +0,0 @@
/* Copyright 2022 splitkb.com <support@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
enum layers {
_DEFAULT = 0,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT] = LAYOUT(
KC_A, KC_B, KC_C, KC_D, KC_E, S(KC_E), S(KC_D), S(KC_C), S(KC_B), S(KC_A),
KC_F, KC_G, KC_H, KC_I, KC_J, S(KC_J), S(KC_I), S(KC_H), S(KC_G), S(KC_F),
KC_K, KC_L, KC_M, KC_N, KC_O, S(KC_O), S(KC_N), S(KC_M), S(KC_L), S(KC_K),
KC_P, KC_Q, S(KC_Q), S(KC_P)
)
};
#ifdef RGBLIGHT_ENABLE
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom(); // enables RGB, without saving settings
rgblight_sethsv_noeeprom(HSV_RED); // sets the color to red without saving
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving
}
#endif
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
// 0 and 1 are left-half encoders
// 2 and 3 are right-half encoders
if (index == 0) {
tap_code(KC_0);
} else if (index == 1) {
tap_code(KC_1);
} else if (index == 2) {
tap_code(KC_2);
} else if (index == 3) {
tap_code(KC_3);
}
if (clockwise) {
tap_code16(KC_PLUS);
} else {
tap_code(KC_MINUS);
}
return false;
}
#endif
#ifdef OLED_ENABLE
bool oled_task_user(void) {
// A 128x32 OLED rotated 90 degrees is 5 characters wide and 16 characters tall
// This example string should fill that neatly
const char *text = PSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%^&*()[]{}-=_+?");
if (is_keyboard_master()) {
oled_write_P(text, false);
} else {
oled_write_P(text, false);
}
return false;
}
#endif

View file

@ -1,25 +0,0 @@
# Aurora Sweep's Debug Keymap
Due to the complex layer setup, the default keymap for the Aurora Sweep is relatively hard to debug.
This debug keymap should make that a lot easier.
## Keys
![Keys](https://raw.githubusercontent.com/splitkb/qmk_firmware/assets/aurora/sweep/keymaps/debug/keys.png)
The left side uses lowercase letters, the right side uses uppercase ones.
## Encoders
Encoders output a number of 0 to 3, depending on the installed position.
These correspond to the index used for custom encoder code.
The number is followed by either a `+` or a `-`, depending on the direction turned.
## LEDs
Both underglow and per-key RGB should be fading between red and off.
## OLEDs
Both the primary and secondary side should be filled with characters.

View file

@ -1,23 +0,0 @@
# Copyright 2022 splitkb.com <support@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/>.
# NOTE: These are already enabled by default at the revision level
#ENCODER_ENABLE = yes
#OLED_ENABLE = yes
# RGB Matrix is enabled at the revision level,
# while we use the regular RGB underglow for testing
RGB_MATRIX_ENABLE = no
RGBLIGHT_ENABLE = yes

View file

@ -1,21 +0,0 @@
/* Copyright 2022 splitkb.com <support@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
#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_EFFECT_BREATHING
#endif

View file

@ -1,73 +0,0 @@
/* Copyright 2022 splitkb.com <support@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
enum layers {
_DEFAULT = 0,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT] = LAYOUT(
KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, S(KC_F), S(KC_E), S(KC_D), S(KC_C), S(KC_B), S(KC_A),
KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, S(KC_L), S(KC_K), S(KC_J), S(KC_I), S(KC_H), S(KC_G),
KC_M, KC_N, KC_O, KC_P, KC_Q, KC_R, KC_S, KC_T, S(KC_T), S(KC_S), S(KC_R), S(KC_Q), S(KC_P), S(KC_O), S(KC_N), S(KC_M),
KC_U, KC_V, KC_W, KC_X, KC_Y, S(KC_Y), S(KC_X), S(KC_W), S(KC_V), S(KC_U)
)
};
#ifdef RGBLIGHT_ENABLE
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom(); // enables RGB, without saving settings
rgblight_sethsv_noeeprom(HSV_RED); // sets the color to red without saving
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving
}
#endif
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
// 0 is left-half encoder,
// 1 is right-half encoder
if (index == 0) {
tap_code(KC_0);
} else if (index == 1) {
tap_code(KC_1);
}
if (clockwise) {
tap_code16(KC_PLUS);
} else {
tap_code(KC_MINUS);
}
return false;
}
#endif
#ifdef OLED_ENABLE
bool oled_task_user(void) {
// A 128x64 OLED rotated 180 degrees is 21 characters wide and 8 characters tall
// This example string should fill that neatly
const char *text = PSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%^&*()[]{}-=_+?/,.|abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%^&*()[]{}-=_+?/,.|");
if (is_keyboard_master()) {
oled_write_P(text, false);
} else {
oled_write_P(text, false);
}
return false;
}
#endif

View file

@ -1,24 +0,0 @@
# Kyria's Debug Keymap
To make debugging your build as easy as possible, we have provided a special debugging keymap. It is not intended to actually type on, it is just here to make sure that your hardware is working correctly.
## Keys
![Keys](https://i.imgur.com/pmPBYlkh.png)
The left side uses lowercase letters, the right side uses uppercase ones.
## Encoders
Encoders output a number of 0 or 1, depending on the installed position.
These correspond to the index used for custom encoder code.
The number is followed by either a `+` or a `-`, depending on the direction turned.
## LEDs
Both underglow and per-key RGB should be fading between red and off.
## OLEDs
Both the primary and secondary side should be filled with characters.

View file

@ -1,8 +0,0 @@
# NOTE: These are already enabled by default at the revision level
#ENCODER_ENABLE = yes
#OLED_ENABLE = yes
# RGB Matrix is enabled at the revision level,
# while we use the regular RGB underglow for testing
RGB_MATRIX_ENABLE = no
RGBLIGHT_ENABLE = yes

View file

@ -1,56 +0,0 @@
# Gotham's Keymap for [Kyria](https://github.com/splitkb/kyria)
## Keymap
This is my personal keymap for Kyria with some mods.
More information about the Kyria keyboard can be found [here](https://blog.splitkb.com/blog/introducing-the-kyria)
### Rotary Encoders
Press the encoder on each half to cycle between:
- Volume
- Word Nav (Ctrl + Left / Right)
- Left / Right
- Up / Down
- Page Up / Page Down
### OLEDs
Master-side OLED displays dynamic data:
- Current layer
- Current mode of each rotary encoder
- Current mode of thumbstick
Slave-side OLED currently only displays a static content.
### Thumbstick
A PSP 2000 thumbstick is attached to the right half. It will currently only function when the USB cable is connected to the right half. When I figure out how to transfer data between halves using serial link, I will make this work regardless of which side is the master.
#### Thumbstick Configuration
- __THUMBSTICK_ENABLE:__ Enable thumbstick.
- __THUMBSTICK_PIN_X/Y (mandatory):__ The QMK pins to use for the respective axis. The values are from the [QMK's ADC driver](https://docs.qmk.fm/#/adc_driver). I used F0 and F1, for example.
- __THUMBSTICK_FLIP_X/Y:__ Mirror the direction of the respective axis. Use to compensate for actual orientation of thumbstick.
- __THUMBSTICK_DEBUG:__ Print raw and calculated values from analogReadPin to console. Will only work with CONSOLE_ENABLE turned on.
#### Thumbstick Fine-tuning
More tunables are described here. Values like deadzone threshold are hardware-specific. The theoretical range for analog readings is [0, 1023], but emperical readings don't extend the entire range. To find the right values, turn on CONSOLE_ENABLE in rules.mk and THUMBSTICK_DEBUG in config.h to look at the raw values from the pins using hid_listen (or QMK Toolbox).
- __THUMBSTICK_DEAD_ZONE 90:__ Values below this are ignored (deadzone).
- __THUMBSTICK_FINE_ZONE 180:__ Values below this enable fine movement.
- __THUMBSTICK_MODE <mode>:__ One of THUMBSTICK_MODE_MOUSE, THUMBSTICK_MODE_ARROWS and THUMBSTICK_MODE_SCROLL. This is just the default mode, it can be changed by calling ```void thumbstick_mode_cycle(bool reverse)``` within code.
- __THUMBSTICK_SPEED 127:__ Cursor speed in THUMBSTICK_MODE_MOUSE.
- __THUMBSTICK_FINE_SPEED 64:__ Fine cursor speed in THUMBSTICK_MODE_MOUSE (kicks in when slightly nudging the thumbstick).
- __THUMBSTICK_SCROLL_SPEED 1:__ Scrolling speed in THUMBSTICK_MODE_SCROLL.
- __THUMBSTICK_EIGHT_AXIS true:__ 8-axis toggle for ARROW and SCROLL modes. Disable to fall back to 4 axes (think D-pads vs analog stick).
- __THUMBSTICK_AXIS_SEPARATION 0.5f:__ Float value between 0 and 1, used to discretize the circular range into distinct zones for 8-axis. Imagine the top-right quadrant on a graph, and picture the diagonal. This value indicates the angular "distance" from the diagonal to either axis. Moving from the diagonal to each of the axes, this value changes from 0 to 1. So, a value of 0.5 will "sweep" from the center to half-way towards each axis, creating a zone across the diagonal. Smaller values make narrower diagonal zones, and vice versa.
#### Thanks
- @pyrho and u/\_GEIST\_ for the inspiration and initial reference code.
- @zvecr and @drashna for code review and more pointers.

View file

@ -1,47 +0,0 @@
/* 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/>.
*/
#pragma once
#define EE_HANDS
// Fix for Elite C rev3
#define SPLIT_USB_DETECT
// Speed up slave half startup
#define SPLIT_USB_TIMEOUT 1000
#ifdef OLED_ENABLE
# define OLED_DISPLAY_128X64
# define OLED_TIMEOUT 10000
#endif
#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
# define RGBLIGHT_EFFECT_KNIGHT
#endif
#ifdef ENCODER_ENABLE
# define ENCODER_DIRECTION_FLIP
# define ENCODER_RESOLUTION 2
#endif
#ifdef THUMBSTICK_ENABLE
# define THUMBSTICK_FLIP_X
# define THUMBSTICK_PIN_X F0
# define THUMBSTICK_PIN_Y F1
#endif

View file

@ -1,94 +0,0 @@
#include "encoder_utils.h"
void encoder_utils_init(void) {
encoder_left_mode = ENC_MODE_VOLUME;
encoder_right_mode = ENC_MODE_LEFT_RIGHT;
}
void set_encoder_mode(bool left, encoder_mode_t mode) {
if (left) {
encoder_left_mode = mode;
} else {
encoder_right_mode = mode;
}
}
encoder_mode_t get_encoder_mode(bool left) {
if (left) {
return encoder_left_mode;
} else {
return encoder_right_mode;
}
}
void cycle_encoder_mode(bool left, bool reverse) {
encoder_mode_t mode = get_encoder_mode(left);
if (reverse) {
mode = (mode == 0) ? (_ENC_MODE_LAST - 1) : (mode - 1);
} else {
mode = (mode == (_ENC_MODE_LAST - 1)) ? 0 : (mode + 1);
}
set_encoder_mode(left, mode);
}
void encoder_action_volume(uint8_t clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
void encoder_action_word_nav(uint8_t clockwise) {
if (clockwise) {
tap_code16(C(KC_RIGHT));
} else {
tap_code16(C(KC_LEFT));
}
}
void encoder_action_left_right(uint8_t clockwise) {
if (clockwise) {
tap_code(KC_RIGHT);
} else {
tap_code(KC_LEFT);
}
}
void encoder_action_up_down(uint8_t clockwise) {
if (clockwise) {
tap_code(KC_UP);
} else {
tap_code(KC_DOWN);
}
}
void encoder_action_paging(uint8_t clockwise) {
if (clockwise) {
tap_code(KC_PGUP);
} else {
tap_code(KC_PGDN);
}
}
void encoder_action(encoder_mode_t mode, uint8_t clockwise) {
switch (mode) {
case ENC_MODE_VOLUME:
encoder_action_volume(clockwise);
break;
case ENC_MODE_WORD_NAV:
encoder_action_word_nav(clockwise);
break;
case ENC_MODE_LEFT_RIGHT:
encoder_action_left_right(clockwise);
break;
case ENC_MODE_UP_DOWN:
encoder_action_up_down(clockwise);
break;
case ENC_MODE_PAGING:
encoder_action_paging(clockwise);
break;
default:
encoder_action_volume(clockwise);
}
}

View file

@ -1,37 +0,0 @@
#pragma once
#include <stdbool.h>
#include "quantum.h"
typedef enum {
ENC_MODE_VOLUME = 0,
ENC_MODE_WORD_NAV,
ENC_MODE_LEFT_RIGHT,
ENC_MODE_UP_DOWN,
ENC_MODE_PAGING,
_ENC_MODE_LAST // Do not use, except for looping through enum values
} encoder_mode_t;
encoder_mode_t encoder_left_mode;
encoder_mode_t encoder_right_mode;
void encoder_utils_init(void);
void set_encoder_mode(bool left, encoder_mode_t mode);
encoder_mode_t get_encoder_mode(bool left);
void cycle_encoder_mode(bool left, bool reverse);
void encoder_action_volume(uint8_t clockwise);
void encoder_action_word_nav(uint8_t clockwise);
void encoder_action_left_right(uint8_t clockwise);
void encoder_action_up_down(uint8_t clockwise);
void encoder_action_paging(uint8_t clockwise);
void encoder_action(encoder_mode_t mode, uint8_t clockwise);

View file

@ -1,16 +0,0 @@
#pragma once
#include "quantum.h"
enum layers { _QWERTY = 0, _LOWER, _RAISE, _ADJUST };
enum custom_keycodes {
ENC_MODE_L = SAFE_RANGE,
ENC_MODE_R,
TMB_MODE,
};
#define ESC_RAISE LT(_RAISE, KC_ESC)
#define BSLS_RAISE LT(_RAISE, KC_BSLS)
#define SFT_QUOT MT(MOD_RSFT, KC_QUOT)
#define CTL_MINS MT(MOD_RCTL, KC_MINS)

View file

@ -1,130 +0,0 @@
/* 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 "keycodes.h"
#ifdef ENCODER_ENABLE
# include "encoder_utils.h"
#endif
#ifdef OLED_ENABLE
# include "oled_utils.h"
#endif
#ifdef THUMBSTICK_ENABLE
# include "thumbstick.h"
#endif
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* Base Layer: QWERTY
*/
[_QWERTY] = LAYOUT(
ESC_RAISE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BSLS_RAISE,
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SFT_QUOT,
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_NO, TMB_MODE, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, CTL_MINS,
ENC_MODE_L, KC_LALT, LT(_LOWER, KC_SPC), LT(_RAISE, KC_TAB), KC_LSFT, KC_EQL, LT(_RAISE, KC_ENT), LT(_LOWER, KC_BSPC), KC_DEL, ENC_MODE_R
),
/*
* Lower Layer: Symbols, Navigation
*/
[_LOWER] = LAYOUT(
_______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, KC_PIPE,
_______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_GRV, KC_PGUP, KC_LEFT, KC_UP, KC_RGHT, _______, KC_QUOT,
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_DOWN, KC_END, _______, KC_MINS,
_______, _______, _______, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, _______, _______, _______
),
/*
* Raise Layer: Number keys, media, more symbols
*/
[_RAISE] = LAYOUT(
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_MINS, KC_PLUS, KC_ASTR, KC_SLSH, KC_PERC, _______,
_______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_AMPR, KC_PIPE, KC_COMM, KC_DOT, KC_SLSH, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/*
* Adjust Layer: Function keys, RGB
*/
[_ADJUST] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
_______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______,
_______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
// clang-format on
void matrix_init_user(void) {
#ifdef ENCODER_ENABLE
encoder_utils_init();
#endif
}
layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
#ifdef ENCODER_ENABLE
case ENC_MODE_L:
if (record->event.pressed) {
cycle_encoder_mode(true, false);
}
break;
case ENC_MODE_R:
if (record->event.pressed) {
cycle_encoder_mode(false, false);
}
break;
#endif
#ifdef THUMBSTICK_ENABLE
case TMB_MODE:
if (record->event.pressed) {
thumbstick_mode_cycle(false);
}
#endif
}
return true;
}
#ifdef OLED_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; }
bool oled_task_user(void) {
render_status();
return false;
}
#endif
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
encoder_action(get_encoder_mode(true), clockwise);
# ifdef OLED_ENABLE
oled_on();
# endif
} else if (index == 1) {
encoder_action(get_encoder_mode(false), clockwise);
# ifdef OLED_ENABLE
oled_on();
# endif
}
return true;
}
#endif

View file

@ -1,103 +0,0 @@
#include "oled_utils.h"
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, 0x00
};
oled_write_P(qmk_logo, false);
}
void render_layer(void) {
oled_write_P(PSTR("\nLayer: "), false);
switch (get_highest_layer(layer_state)) {
case _QWERTY:
oled_write_P(PSTR("Default\n"), false);
break;
case _LOWER:
oled_write_P(PSTR("Lower\n"), false);
break;
case _RAISE:
oled_write_P(PSTR("Raise\n"), false);
break;
case _ADJUST:
oled_write_P(PSTR("Adjust\n"), false);
break;
default:
oled_write_P(PSTR("???\n"), false);
}
}
#ifdef ENCODER_ENABLE
void render_encoder(encoder_mode_t mode) {
switch (mode) {
case ENC_MODE_VOLUME:
oled_write_P(PSTR("Volume\n"), false);
break;
case ENC_MODE_WORD_NAV:
oled_write_P(PSTR("Word Nav\n"), false);
break;
case ENC_MODE_LEFT_RIGHT:
oled_write_P(PSTR("Left / Right\n"), false);
break;
case ENC_MODE_UP_DOWN:
oled_write_P(PSTR("Up / Down\n"), false);
break;
case ENC_MODE_PAGING:
oled_write_P(PSTR("PgUp / PgDwn\n"), false);
break;
default:
oled_write_P(PSTR("???\n"), false);
}
}
#endif
#ifdef THUMBSTICK_ENABLE
void render_thumbstick(thumbstick_mode_t mode) {
switch (mode) {
case THUMBSTICK_MODE_MOUSE:
oled_write_P(PSTR("Mouse"), false);
break;
case THUMBSTICK_MODE_ARROWS:
oled_write_P(PSTR("Arrows"), false);
break;
case THUMBSTICK_MODE_SCROLL:
oled_write_P(PSTR("Scroll"), false);
break;
default:
oled_write_P(PSTR("???\n"), false);
}
}
#endif
void render_status(void) {
if (is_keyboard_master()) {
// Host Keyboard Layer Status
render_layer();
#ifdef ENCODER_ENABLE
// Encoder state
oled_write_P(PSTR("L-Enc: "), false);
render_encoder(encoder_left_mode);
oled_write_P(PSTR("R-Enc: "), false);
render_encoder(encoder_right_mode);
#endif
#ifdef THUMBSTICK_ENABLE
if (!isLeftHand) {
// Thumbstick state
oled_write_P(PSTR("Joystick: "), false);
render_thumbstick(thumbstick_state.config.mode);
}
#endif
// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
} else {
// QMK Logo and version information
render_qmk_logo();
oled_write_P(PSTR("\n Kyria v1.0\n"), false);
}
}

View file

@ -1,25 +0,0 @@
#pragma once
#include "keycodes.h"
#ifdef ENCODER_ENABLE
# include "encoder_utils.h"
#endif
#ifdef THUMBSTICK_ENABLE
# include "thumbstick.h"
#endif
void render_kyria_logo(void);
void render_layer(void);
#ifdef ENCODER_ENABLE
void render_encoder(encoder_mode_t mode);
#endif
#ifdef THUMBSTICK_ENABLE
void render_thumbstick(thumbstick_mode_t mode);
#endif
void render_status(void);

View file

@ -1,22 +0,0 @@
CONSOLE_ENABLE = yes # Console for debug
ENCODER_ENABLE = yes # ENables the use of one or more encoders
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MOUSEKEY_ENABLE = no # Mouse keys
OLED_ENABLE = yes
THUMBSTICK_ENABLE = yes # Enables analog thumbstick code
ifeq ($(strip $(ENCODER_ENABLE)), yes)
SRC += encoder_utils.c
endif
ifeq ($(strip $(OLED_ENABLE)), yes)
SRC += oled_utils.c
endif
ifeq ($(strip $(THUMBSTICK_ENABLE)), yes)
ANALOG_DRIVER_REQUIRED = yes
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = custom
OPT_DEFS += -DTHUMBSTICK_ENABLE
SRC += thumbstick.c
endif

View file

@ -1,195 +0,0 @@
#include "thumbstick.h"
void thumbstick_init(void) {
thumbstickTimer = 0;
thumbstickScrollTimer = 0;
thumbstick_state.config.mode = THUMBSTICK_MODE_MOUSE;
thumbstick_state.config.deadZone = THUMBSTICK_DEAD_ZONE;
thumbstick_state.config.fineZone = THUMBSTICK_FINE_ZONE;
thumbstick_state.config.speed = THUMBSTICK_SPEED;
thumbstick_state.config.fineSpeed = THUMBSTICK_FINE_SPEED;
thumbstick_state.config.axisSeparation = THUMBSTICK_AXIS_SEPARATION;
thumbstick_state.config.eightAxis = THUMBSTICK_EIGHT_AXIS;
#if defined THUMBSTICK_DEBUG
rawX = 0;
rawY = 0;
distX = 0;
distY = 0;
thumbstickLogTimer = 0;
#endif
}
// Axis-level wrapper to read raw value, do logging and calculate speed
int16_t thumbstick_get_component(uint8_t pin) {
uint16_t analogValue = analogReadPin(pin);
// Compute direction
bool directionIsPositive = (analogValue > THUMBSTICK_RANGE_CENTER);
// Compute distance from the center
uint16_t distance = directionIsPositive ? (analogValue - THUMBSTICK_RANGE_CENTER) : (THUMBSTICK_RANGE_CENTER - analogValue);
#if defined THUMBSTICK_DEBUG
if (pin == THUMBSTICK_PIN_X) {
rawX = analogValue;
distX = distance;
} else {
rawY = analogValue;
distY = distance;
}
#endif
// Compute component (range of [0 to 1023])
return directionIsPositive ? distance : -(int16_t)distance;
}
void thumbstick_mode_set(thumbstick_mode_t mode) { thumbstick_state.config.mode = mode; }
thumbstick_mode_t thumbstick_mode_get(void) { return thumbstick_state.config.mode; }
void thumbstick_mode_cycle(bool reverse) {
thumbstick_mode_t mode = thumbstick_mode_get();
if (reverse) {
mode = (mode == 0) ? (_THUMBSTICK_MODE_LAST - 1) : (mode - 1);
} else {
mode = (mode == (_THUMBSTICK_MODE_LAST - 1)) ? 0 : (mode + 1);
}
thumbstick_mode_set(mode);
}
// Get mouse speed
int16_t thumbstick_get_mouse_speed(int16_t component) {
int16_t maxSpeed;
uint16_t distance = abs(component);
if (distance > THUMBSTICK_FINE_ZONE) {
maxSpeed = THUMBSTICK_SPEED;
} else if (distance > THUMBSTICK_DEAD_ZONE) {
maxSpeed = THUMBSTICK_FINE_SPEED;
} else {
return 0;
}
return (float)maxSpeed * component / THUMBSTICK_RANGE_CENTER;
}
// Fix direction within one of 8 axes (or 4 if 8-axis is disabled)
thumbstick_direction_t thumbstick_get_discretized_direction(thumbstick_vector_t vector, float axisSeparation, bool eightAxis) {
thumbstick_direction_t direction;
uint16_t absX = abs(vector.x);
uint16_t absY = abs(vector.y);
uint16_t maxComponent = (absX > absY) ? absX : absY;
bool insideDeadZone = (maxComponent <= THUMBSTICK_DEAD_ZONE);
bool outsideDiagonalZone = ((abs(absX - absY) / (float)maxComponent) >= axisSeparation);
if (insideDeadZone) {
direction.up = direction.down = direction.left = direction.right = false;
} else {
direction.up = (vector.y < 0);
direction.down = (vector.y > 0);
direction.left = (vector.x < 0);
direction.right = (vector.x > 0);
// Let only the dominant direction remain under the right conditions
if (outsideDiagonalZone || !eightAxis) {
if (absX > absY) {
direction.up = direction.down = false;
} else {
direction.left = direction.right = false;
}
}
}
return direction;
}
thumbstick_direction_t scrollDirection; // Declaring global to save stack space
void thumbstick_process(void) {
if (timer_elapsed(thumbstickTimer) > THUMBSTICK_TIMEOUT) {
thumbstickTimer = timer_read();
#ifndef THUMBSTICK_FLIP_X
thumbstick_state.vector.x = thumbstick_get_component(THUMBSTICK_PIN_X);
#else
thumbstick_state.vector.x = -thumbstick_get_component(THUMBSTICK_PIN_X);
#endif
#ifndef THUMBSTICK_FLIP_Y
thumbstick_state.vector.y = thumbstick_get_component(THUMBSTICK_PIN_Y);
#else
thumbstick_state.vector.y = -thumbstick_get_component(THUMBSTICK_PIN_Y);
#endif
switch (thumbstick_state.config.mode) {
case THUMBSTICK_MODE_MOUSE:
thumbstick_state.report.x = thumbstick_get_mouse_speed(thumbstick_state.vector.x);
thumbstick_state.report.y = thumbstick_get_mouse_speed(thumbstick_state.vector.y);
break;
case THUMBSTICK_MODE_ARROWS:
thumbstick_state.direction = thumbstick_get_discretized_direction(thumbstick_state.vector, thumbstick_state.config.axisSeparation, thumbstick_state.config.eightAxis);
break;
case THUMBSTICK_MODE_SCROLL:
if (timer_elapsed(thumbstickScrollTimer) > THUMBSTICK_SCROLL_TIMEOUT) {
thumbstickScrollTimer = timer_read();
scrollDirection = thumbstick_get_discretized_direction(thumbstick_state.vector, thumbstick_state.config.axisSeparation, false);
thumbstick_state.report.v = (scrollDirection.up || scrollDirection.down) ? (scrollDirection.up ? THUMBSTICK_SCROLL_SPEED : -THUMBSTICK_SCROLL_SPEED) : 0;
thumbstick_state.report.h = (scrollDirection.left || scrollDirection.right) ? (scrollDirection.left ? -THUMBSTICK_SCROLL_SPEED : THUMBSTICK_SCROLL_SPEED) : 0;
} else {
thumbstick_state.report.v = thumbstick_state.report.h = 0;
}
break;
default:
break;
}
}
}
void update_keycode_status(uint16_t keycode, bool last, bool current) {
if (last != current) {
if (current) {
register_code16(keycode);
} else {
unregister_code16(keycode);
}
}
}
void pointing_device_init(void) { thumbstick_init(); }
bool pointing_device_task(void) {
report_mouse_t report = pointing_device_get_report();
if (!isLeftHand) {
thumbstick_process();
switch (thumbstick_state.config.mode) {
case THUMBSTICK_MODE_MOUSE:
report.x = thumbstick_state.report.x;
report.y = thumbstick_state.report.y;
#ifdef THUMBSTICK_DEBUG
if (timer_elapsed(thumbstickLogTimer) > 100) {
thumbstickLogTimer = timer_read();
uprintf("Raw (%d, %d); Dist (%u, %u); Vec (%d, %d);\n", rawX, rawY, distX, distY, thumbstick_state.vector.x, thumbstick_state.vector.y);
}
#endif
break;
case THUMBSTICK_MODE_ARROWS:
update_keycode_status(KC_UP, thumbstick_state.lastDirection.up, thumbstick_state.direction.up);
update_keycode_status(KC_DOWN, thumbstick_state.lastDirection.down, thumbstick_state.direction.down);
update_keycode_status(KC_LEFT, thumbstick_state.lastDirection.left, thumbstick_state.direction.left);
update_keycode_status(KC_RIGHT, thumbstick_state.lastDirection.right, thumbstick_state.direction.right);
thumbstick_state.lastDirection = thumbstick_state.direction;
#ifdef THUMBSTICK_DEBUG
if (timer_elapsed(thumbstickLogTimer) > 100) {
thumbstickLogTimer = timer_read();
uprintf("Up %d; Down %d; Left: %d; Right %d; Vec (%d, %d);\n", direction.up, direction.down, direction.left, direction.right, thumbstick_state.vector.x, thumbstick_state.vector.y);
}
#endif
break;
case THUMBSTICK_MODE_SCROLL:
report.v = thumbstick_state.report.v;
report.h = thumbstick_state.report.h;
#ifdef THUMBSTICK_DEBUG
if (timer_elapsed(thumbstickLogTimer) > 100) {
thumbstickLogTimer = timer_read();
uprintf("Scroll (%d, %d)\n", report.h, report.v);
}
#endif
break;
default:
break;
}
}
pointing_device_set_report(report);
return pointing_device_send();
}

View file

@ -1,98 +0,0 @@
#pragma once
typedef enum {
THUMBSTICK_MODE_MOUSE = 0,
THUMBSTICK_MODE_ARROWS,
THUMBSTICK_MODE_SCROLL,
_THUMBSTICK_MODE_LAST // Do not use, except for looping through enum values
} thumbstick_mode_t;
// Parameters
#define THUMBSTICK_DEAD_ZONE 90 // Values below this are ignored (deadzone)
#define THUMBSTICK_FINE_ZONE 180 // Values below this enable fine movement
#define THUMBSTICK_MODE THUMBSTICK_MODE_MOUSE
#define THUMBSTICK_SPEED 256
#define THUMBSTICK_FINE_SPEED 96
#define THUMBSTICK_SCROLL_SPEED 1
#define THUMBSTICK_EIGHT_AXIS true
#define THUMBSTICK_AXIS_SEPARATION 0.5f
// Implicit and derived constants
#define THUMBSTICK_TIMEOUT 10 // Mouse report throttling time in ms
#define THUMBSTICK_SCROLL_TIMEOUT 200 // Mouse scroll throttling time in ms
#define THUMBSTICK_RANGE_START 0
#define THUMBSTICK_RANGE_STOP 1023
#define THUMBSTICK_RANGE_CENTER (THUMBSTICK_RANGE_STOP - THUMBSTICK_RANGE_START + 1) / 2
#define THUMBSTICK_RANGE_MOVEMENT (THUMBSTICK_RANGE_CENTER - THUMBSTICK_DEAD_ZONE)
#include "timer.h"
#include "analog.h"
#include "split_util.h"
#include "pointing_device.h"
#if defined THUMBSTICK_DEBUG
# include "print.h"
uint16_t rawX;
uint16_t rawY;
uint16_t distX;
uint16_t distY;
uint16_t thumbstickLogTimer;
#endif
typedef struct {
thumbstick_mode_t mode;
uint16_t deadZone;
uint16_t fineZone;
uint16_t speed;
uint16_t fineSpeed;
float axisSeparation;
bool eightAxis;
} thumbstick_config_t;
typedef struct {
int16_t x;
int16_t y;
} thumbstick_vector_t;
typedef struct {
bool up;
bool right;
bool down;
bool left;
} thumbstick_direction_t;
typedef struct {
thumbstick_config_t config;
thumbstick_vector_t vector;
thumbstick_direction_t direction;
thumbstick_direction_t lastDirection;
report_mouse_t report;
} thumbstick_state_t;
uint16_t thumbstickTimer;
uint16_t thumbstickScrollTimer;
thumbstick_state_t thumbstick_state;
void thumbstick_mode_set(thumbstick_mode_t mode);
thumbstick_mode_t thumbstick_mode_get(void);
void thumbstick_mode_cycle(bool reverse);
void thumbstick_init(void);
// Axis-level wrapper to read raw value, do logging and calculate speed
int16_t thumbstick_get_component(uint8_t pin);
// Get mouse speed
int16_t thumbstick_get_mouse_speed(int16_t component);
// Fix direction within one of 8 axes (or 4 if 8-axis is disabled)
thumbstick_direction_t thumbstick_get_discretized_direction(thumbstick_vector_t vector, float axisSeparation, bool eightAxis);
void thumbstick_process(void);
void update_keycode_status(uint16_t keycode, bool last, bool current);

View file

@ -1,41 +0,0 @@
/* 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/>.
*/
#pragma once
#ifdef OLED_ENABLE
#define OLED_DISPLAY_128X64
#endif
#ifdef RGBLIGHT_ENABLE
#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
#define RGBLIGHT_EFFECT_TWINKLE
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif
// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
// #define SPLIT_USB_DETECT
// #define NO_USB_STARTUP_CHECK

View file

@ -1,249 +0,0 @@
/* 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_bepo.h"
enum layers {
_BEPO = 0,
_LOWER,
_RAISE,
_ADJUST
};
#define RESC LT(_RAISE, KC_ESC)
#define BP_EA BP_EACU
#define BP_AG BP_AGRV
#define BP_EG BP_EGRV
#define BP_DC BP_DCIR
#define BP_AP BP_QUOT
#define BP_CO BP_COMM
#define BP_DT BP_DOT
#define LS KC_LSFT
#define BP_DOL BP_DLR
/* Bottom Row */
#define BR01 KC_LCTL
#define BR02 KC_LALT
#define BR03 MT(MOD_LGUI, KC_ENT)
#define BR04 LT(_LOWER, KC_SPC)
#define BR05 LT(_RAISE, KC_ESC)
#define BR06 LT(_LOWER, KC_ENT)
#define BR07 LT(_RAISE, KC_SPC)
#define BR08 KC_TAB
#define BR09 KC_BSPC
#define BR10 KC_RALT
/* Under the screen row */
#define U1 KC_LSFT
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* Base Layer: BÉPO
*
* ,-------------------------------------------. ,-------------------------------------------.
* |RAIS/ESC| B | É | P | O | È | | ^ | V | D | L | J | | Z |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | W | A | U | I | E | , | | C | T | S | R | N | M |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | LShift | À | Y | X | . | K | SPC |LShift| |LShift|LShift| | Q | G | H | F | Ç |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | CTRL | Alt | Enter| Space| Esc | | Enter| Space| Tab | Bksp | AltGr|
* | | | CMD | Lower| Raise| | Lower| Raise| | | |
* `----------------------------------' `----------------------------------'
*/
[_BEPO] = LAYOUT(
RESC, BP_B, BP_EA, BP_P, BP_O, BP_EG, BP_DC, BP_V, BP_D, BP_L, BP_J, BP_Z,
BP_W, BP_A, BP_U, BP_I, BP_E, BP_CO, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M,
LS, BP_AG, BP_Y, BP_X, BP_DT, BP_K, KC_SPC, U1, U1, U1, BP_AP, BP_Q, BP_G, BP_H, BP_F, BP_CCED,
BR01, BR02, BR03, BR04, BR05, BR06, BR07, BR08, BR09, BR10
),
/*
* Lower Layer: Numbers and symbols ?
*
* ,-------------------------------------------. ,-------------------------------------------.
* | $ | " | « | » | ( | ) | | @ | + | - | / | * | = |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | # | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ° |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | % | | | | | | | | | | | | | | | | ` |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | | | | | | | |
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
*/
[_LOWER] = LAYOUT(
BP_DOL , BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL,
BP_HASH, BP_1, BP_2, BP_3, BP_4, BP_5, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEG,
BP_PERC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BP_GRV,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/*
* Raise Layer: Media
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | | | | | | | | | | | | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | Prev | Play | Next | VolUp| | Left | Down | Up | Right| | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | | | | | Mute | VolDn| | | | | | MLeft| Mdown| MUp |MRight| | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | | | | | | | |
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
*/
[_RAISE] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
_______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/*
* Adjust Layer: Function keys, RGB
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | | | | | | | |
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
*/
[_ADJUST] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
_______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______,
_______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
// /*
// * 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[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0,
0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0,
0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
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 rev1.0\n\n"), false);
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case _BEPO:
oled_write_P(PSTR("BEPO\n"), false);
break;
case _LOWER:
oled_write_P(PSTR("NumSym\n"), false);
break;
case _RAISE:
oled_write_P(PSTR("Media\n"), false);
break;
case _ADJUST:
oled_write_P(PSTR("Adjust\n"), false);
break;
default:
oled_write_P(PSTR("Undefined\n"), false);
}
// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(led_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
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// Volume control
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
else if (index == 1) {
// Page up/Page down
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
}
return true;
}
#endif

View file

@ -1,3 +0,0 @@
OLED_ENABLE = yes
ENCODER_ENABLE = yes # Enables the use of one or more encoders
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow