You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.1 KiB

  1. #include "kitten_paw.h"
  2. void matrix_init_kb(void) {
  3. // put your keyboard start-up code here
  4. // runs once when the firmware starts up
  5. matrix_init_user();
  6. }
  7. void matrix_scan_kb(void) {
  8. // put your looping keyboard code here
  9. // runs every cycle (a lot)
  10. matrix_scan_user();
  11. }
  12. __attribute__ ((weak))
  13. void matrix_init_user(void) {
  14. }
  15. __attribute__ ((weak))
  16. void matrix_scan_user(void) {
  17. }
  18. bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  19. // put your per-action keyboard code here
  20. // runs for every action, just before processing by the firmware
  21. return process_record_user(keycode, record);
  22. }
  23. void led_set_kb(uint8_t usb_led) {
  24. // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
  25. CONFIG_LED_IO;
  26. CONFIG_LED_IO;
  27. print_dec(usb_led);
  28. if (usb_led & (1<<USB_LED_CAPS_LOCK))
  29. USB_LED_CAPS_LOCK_ON;
  30. else
  31. USB_LED_CAPS_LOCK_OFF;
  32. if (usb_led & (1<<USB_LED_NUM_LOCK))
  33. USB_LED_NUM_LOCK_ON;
  34. else
  35. USB_LED_NUM_LOCK_OFF;
  36. if (usb_led & (1<<USB_LED_SCROLL_LOCK))
  37. USB_LED_SCROLL_LOCK_ON;
  38. else
  39. USB_LED_SCROLL_LOCK_OFF;
  40. led_set_user(usb_led);
  41. }