This commit is contained in:
Sendy YK 2020-08-12 04:05:27 +07:00
parent b7364b3764
commit 5688c1bdc9
3 changed files with 12 additions and 34 deletions

View File

@ -39,30 +39,3 @@
{ K30, K31, K32, K33 }, \ { K30, K31, K32, K33 }, \
{ K40, K41, K42, K43 } \ { K40, K41, K42, K43 } \
} }
/* LAYOUT_Numpad_5x4_mrsendyyk
*
* 00 01 02 03
*
* 10 11 12
* 23
* 20 21 22
*
* 30 31 32
* 43
* 40 42
*
*/
#define LAYOUT_Numpad_5x4_mrsendyyk( \
K00, K01, K02, K03, \
K10, K11, K12, \
K20, K21, K22, K23, \
K30, K31, K32, \
K40, K42, K43 \
) { \
{ K00, K01, K02, K03 }, \
{ K10, K11, K12, KC_NO }, \
{ K20, K21, K22, K23 }, \
{ K30, K31, K32, KC_NO }, \
{ K40, KC_NO, K42, K43 } \
}

View File

@ -68,25 +68,28 @@ void keyboard_post_init_user(void) {
rgblight_sethsv_noeeprom(0, 0, 0); rgblight_sethsv_noeeprom(0, 0, 0);
}; };
// RGB Underglow as Caps Lock, Num Lock, and Layer Indicator // RGB Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator
void update_led(void) { // Num Lock Indicator (Press & Hold Right `Ctrl` Key + Press `N` Key) void update_led(void) {
if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) { if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) { // Num Lock Indicator (Press & Hold Right `Ctrl` Key + Press `N` Key)
rgblight_setrgb(100, 255, 100); rgblight_setrgb(225, 8, 0);
}
if (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) { // Scroll Lock Indicator (Press & Hold Right `Ctrl` Key + Press `S` Key)
rgblight_setrgb(0, 100, 255);
} }
}; };
void led_set_user(uint8_t usb_led) { void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { // Caps Lock Indicator if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { // Caps Lock Indicator
writePinLow(B2); writePinLow(B2);
rgblight_setrgb(255, 110, 0); rgblight_setrgb(100, 255, 100);
} else { // Layer Indicator } else { // Layer Indicator
switch (biton32(layer_state)) { switch (biton32(layer_state)) {
case 1: // Layer [1] Indicator (Press & Hold Right `Ctrl` Key) case 1: // Layer [1] Indicator (Press & Hold Right `Ctrl` Key)
rgblight_setrgb(225, 8, 0); rgblight_setrgb(255, 110, 0);
break; break;
case 2: // Layer [2] Indicator (Press & Hold Right `Alt` Key) case 2: // Layer [2] Indicator (Press & Hold Right `Alt` Key)
rgblight_setrgb(225, 8, 0); rgblight_setrgb(255, 110, 0);
break; break;
default: // Layer [0] Indicator default: // Layer [0] Indicator
rgblight_setrgb(0, 0, 0); rgblight_setrgb(0, 0, 0);

View File

@ -1,5 +1,7 @@
# [Sendy YK](https://mr.sendyyk.com)'s Keymap # [Sendy YK](https://mr.sendyyk.com)'s Keymap
With RGB Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator
### Layer [0] ### Layer [0]
``` ```