1
0
Fork 0
forked from forks/qmk_firmware
qmk_firmware/layouts/community/numpad_5x6/bjohnson/keymap.c

53 lines
1.5 KiB
C
Raw Normal View History

#include QMK_KEYBOARD_H
extern rgblight_config_t rgblight_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_numpad_5x6(
KC_F1, LT(1,KC_F2), KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_F3, KC_F4, KC_P7, KC_P8, KC_P9,
KC_F5, KC_F6, KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_F7, KC_F8, KC_P1, KC_P2, KC_P3,
KC_F9, KC_F10, KC_P0, KC_PDOT, KC_PENT
),
[1] = LAYOUT_numpad_5x6(
RGB_TOG, _______, _______, _______, _______, RESET,
RGB_MOD, RGB_RMOD, _______, _______, _______,
RGB_HUI, RGB_HUD, _______, _______, _______, _______,
RGB_SAI, RGB_SAD, _______, _______, _______,
RGB_VAI, RGB_VAD, _______, _______, _______
),
};
void keyboard_post_init_user(void) {
#ifdef RGBLIGHT_ENABLE
uint8_t temp_mode = rgblight_config.mode;
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
[Keymap] Big Drashna code update (#6639) * Add a quefrency keymap * New Alt-ernate layouts * Enable Per Key Tapping Term to preserve sanity * Use underglow and mod lights for status on Corne * Update the drashna_ms keymap for quefrency * Disable Audio since there isn't enough space * Update KC_MAKE to ues :flash target * Cleanup ergodox layout * Enable i2c support for Iris * Add keymap support for CG_SWAP * Enable RGB Matrix Shutdown mode * enable heatmap * Update gitlab CI to install python3 * Remove game macros These are no longer needed, and haven't been used in ages * Cleanup planck layout * Add RGB Matrix fun and RGB cleanup * Add keycode and config for RGB Matrix idle animations * Clean up rgb idle animation code * Add rgb idle keycode to keymaps * Fix issues with rgb matrix idle animation * Fix some handling for idle animation * Reduce idle animation timeout to 15s to be more reasonable * fix up rgb stuff * Fix isses with rgb functions not being called for matrix * Use custom EEPROM Magic Number so testing is easier * Extend Default Layer macro to support a lot more layers * Fix bjohnson macropad * Adjust KC_MAKE to process mods for more consistent behavior * Fix up rgb stuff on corne * Corne OLED Overhaul * Fixes a number of issues with weirdness. * Fixes issues with keylogger (should be more reliable now) * Modulaize the OLED render sections * Rewrite layer display code * Update URL for Font Editor Due to odd issues, I ended up rewriting from scratch. And using PROGMEM versions, since I think I was getting memory overflows. * Update polling rate on all keebs * Fix planck ez layout config * Remove macros from Viterbi
2019-09-07 17:57:30 +02:00
for (uint16_t i = 255; i > 0; i--) {
rgblight_sethsv_noeeprom( ( i + 128) % 255, 255, 255);
matrix_scan();
wait_ms(10);
}
led_set_user(host_keyboard_leds());
rgblight_mode_noeeprom(temp_mode);
#endif
}
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
rgblight_sethsv_noeeprom_cyan();
} else {
rgblight_sethsv_noeeprom_magenta();
}
}
void shutdown_user (void) {
#ifdef RGBLIGHT_ENABLE
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
rgblight_setrgb_red();
#endif // RGBLIGHT_ENABLE
}