-
-
Notifications
You must be signed in to change notification settings - Fork 37.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added my prototype keyboard K_Pro v1 TKL #23797
base: master
Are you sure you want to change the base?
Conversation
Modified preview layout in keymap.c
keyboards/k_pro_v1_tkl/readme.md
Outdated
![k_pro_v1_tkl](imgur.com image replace me!) | ||
|
||
*A short description of the keyboard/project* | ||
|
||
* Keyboard Maintainer: [ksmosna](https://github.com/ksmosna) | ||
* Hardware Supported: *The PCBs, controllers supported* | ||
* Hardware Availability: *Links to where you can find this hardware* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fill these fields out.
keyboards/k_pro_v1_tkl/config.h
Outdated
#define DRIVER_1_LED_TOTAL 59 | ||
#define DRIVER_2_LED_TOTAL 33 | ||
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define DRIVER_1_LED_TOTAL 59 | |
#define DRIVER_2_LED_TOTAL 33 | |
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
keyboards/k_pro_v1_tkl/config.h
Outdated
#define ENCODERS_PAD_A { B8 } | ||
#define ENCODERS_PAD_B { B9 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please migrate this to keyboard.json
file.
#define ENCODERS_PAD_A { B8 } | |
#define ENCODERS_PAD_B { B9 } |
keyboards/k_pro_v1_tkl/halconf.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is missing a license header.
keyboards/k_pro_v1_tkl/info.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename this file to keyboard.json
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is missing a license header.
|
||
#ifdef OLED_ENABLE | ||
bool oled_task_user(void) { | ||
// Host Keyboard LED Status | ||
led_t led_state = host_keyboard_led_state(); | ||
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
|
||
// Host Keyboard RGB backlight status | ||
oled_write_P(PSTR("-----"), false); | ||
oled_write_P(PSTR("Light"), false); | ||
return false; | ||
} | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If OLEDs are enabled at the keyboard level, there needs to be configuration for them at the keyboard level as well. This should be moved to the k_pro_v1_tkl.c
file using the oled_task_kb()
function.
#ifdef OLED_ENABLE | |
bool oled_task_user(void) { | |
// Host Keyboard LED Status | |
led_t led_state = host_keyboard_led_state(); | |
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | |
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | |
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | |
// Host Keyboard RGB backlight status | |
oled_write_P(PSTR("-----"), false); | |
oled_write_P(PSTR("Light"), false); | |
return false; | |
} | |
#endif |
|
||
#ifdef OLED_ENABLE | ||
bool oled_task_user(void) { | ||
// Host Keyboard LED Status | ||
led_t led_state = host_keyboard_led_state(); | ||
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
|
||
// Host Keyboard RGB backlight status | ||
oled_write_P(PSTR("-----"), false); | ||
oled_write_P(PSTR("Light"), false); | ||
return false; | ||
} | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above.
#ifdef OLED_ENABLE | |
bool oled_task_user(void) { | |
// Host Keyboard LED Status | |
led_t led_state = host_keyboard_led_state(); | |
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | |
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | |
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | |
// Host Keyboard RGB backlight status | |
oled_write_P(PSTR("-----"), false); | |
oled_write_P(PSTR("Light"), false); | |
return false; | |
} | |
#endif |
keyboards/k_pro_v1_tkl/mcuconf.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is missing a license header.
keyboards/k_pro_v1_tkl/rules.mk
Outdated
I2C_DRIVER_REQUIRED = yes | ||
|
||
OLED_ENABLE = yes | ||
OLED_DRIVER = ssd1306 | ||
OLED_TRANSPORT = i2c | ||
|
||
RGB_MATRIX_ENABLE = yes | ||
RGB_MATRIX_DRIVER = is31fl3733 | ||
|
||
ENCODER_ENABLE = yes | ||
ENCODER_MAP_ENABLE = yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I2C_DRIVER_REQUIRED = yes | |
OLED_ENABLE = yes | |
OLED_DRIVER = ssd1306 | |
OLED_TRANSPORT = i2c | |
RGB_MATRIX_ENABLE = yes | |
RGB_MATRIX_DRIVER = is31fl3733 | |
ENCODER_ENABLE = yes | |
ENCODER_MAP_ENABLE = yes | |
I2C_DRIVER_REQUIRED = yes | |
RGB_MATRIX_DRIVER = is31fl3733 |
keyboards/k_pro_v1_tkl/info.json
Outdated
"console": false, | ||
"extrakey": true, | ||
"mousekey": true, | ||
"nkro": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"nkro": true | |
"nkro": true, | |
"rgb_matrix": true, | |
"encoder": true, | |
"oled": true |
…the one received from STMicroelectronics, added missing licence headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PB_#
keycodes need to be switched out with QK_KB_#
keycodes
uint32_t timer = 0; | ||
uint8_t current_frame = 0; | ||
|
||
static void render_logo(void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could reduce the size significantly by removing the columns that are empty. I know it's not as much of a concern here (f411), but may be a good idea, in general.
}; | ||
if (!animation_finished && timer_elapsed(timer) > FRAME_DURATION) { | ||
timer = timer_read(); | ||
oled_clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be necessary, at all.
char buffer[32]; | ||
switch (menu) { | ||
case 0: // Main | ||
const char* options[3] = {"RGB", "Brightness", "Animation"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't progmem, so the code that you have below is wrong.
} else { | ||
oled_write_P(PSTR(" "), false); | ||
} | ||
oled_write_P(options[i], false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oled_write_P(options[i], false); | |
oled_write(options[i], false); |
snprintf(buffer, sizeof(buffer), "RGB: %s", rgb_matrix_is_enabled() ? "On" : "Off"); | ||
oled_write(buffer, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This avoids using sprintf, which is rather large in usage.
snprintf(buffer, sizeof(buffer), "RGB: %s", rgb_matrix_is_enabled() ? "On" : "Off"); | |
oled_write(buffer, false); | |
oled_write_P(PSTR("RGB: "), false); | |
oled_write_P(rgb_matrix_is_enabled() ? PSTR("On") : PSTR("Off") , false); |
[1] = LAYOUT_tkl_ansi( | ||
KC_NO, 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_NO, 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_PSCR, KC_SCRL, KC_PAUS, | ||
KC_NO, 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_INS, KC_HOME, KC_PGUP, | ||
KC_NO, 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_DEL, KC_END, KC_PGDN, | ||
KC_NO, 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_NO, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
), | ||
[2] = LAYOUT_tkl_ansi( | ||
KC_NO, 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_NO, 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_PSCR, KC_SCRL, KC_PAUS, | ||
KC_NO, 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_INS, KC_HOME, KC_PGUP, | ||
KC_NO, 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_DEL, KC_END, KC_PGDN, | ||
KC_NO, 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_NO, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
), | ||
[3] = LAYOUT_tkl_ansi( | ||
KC_NO, 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_NO, 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_PSCR, KC_SCRL, KC_PAUS, | ||
KC_NO, 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_INS, KC_HOME, KC_PGUP, | ||
KC_NO, 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_DEL, KC_END, KC_PGDN, | ||
KC_NO, 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_NO, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all duplicates of the base layer. These should be removed.
[1] = LAYOUT_tkl_ansi( | |
KC_NO, 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_NO, 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_PSCR, KC_SCRL, KC_PAUS, | |
KC_NO, 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_INS, KC_HOME, KC_PGUP, | |
KC_NO, 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_DEL, KC_END, KC_PGDN, | |
KC_NO, 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_NO, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | |
), | |
[2] = LAYOUT_tkl_ansi( | |
KC_NO, 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_NO, 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_PSCR, KC_SCRL, KC_PAUS, | |
KC_NO, 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_INS, KC_HOME, KC_PGUP, | |
KC_NO, 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_DEL, KC_END, KC_PGDN, | |
KC_NO, 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_NO, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | |
), | |
[3] = LAYOUT_tkl_ansi( | |
KC_NO, 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_NO, 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_PSCR, KC_SCRL, KC_PAUS, | |
KC_NO, 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_INS, KC_HOME, KC_PGUP, | |
KC_NO, 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_DEL, KC_END, KC_PGDN, | |
KC_NO, 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_NO, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | |
) |
[1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, | ||
[2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, | ||
[3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, | |
[2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, | |
[3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, |
@@ -0,0 +1,39 @@ | |||
# adler | |||
|
|||
![adler](imgur.com image replace me!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this?
#include "keycodes.h" | ||
#include "i2c_master.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include "keycodes.h" | |
#include "i2c_master.h" |
I2C_DRIVER_REQUIRED = yes | ||
PROGRAMMABLE_BUTTON_ENABLE = yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I2C_DRIVER_REQUIRED = yes | |
PROGRAMMABLE_BUTTON_ENABLE = yes |
i2c driver required setting isn't required.
Also, the programmable button feature isn't meant for macros or custom functionality. It's a host side thing.
https://docs.qmk.fm/features/programmable_button
Description
Types of Changes
Issues Fixed or Closed by This PR
Checklist