kitten_paw.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  13. // put your per-action keyboard code here
  14. // runs for every action, just before processing by the firmware
  15. return process_record_user(keycode, record);
  16. }
  17. void led_set_kb(uint8_t usb_led) {
  18. // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
  19. CONFIG_LED_IO;
  20. CONFIG_LED_IO;
  21. print_dec(usb_led);
  22. if (usb_led & (1<<USB_LED_CAPS_LOCK))
  23. USB_LED_CAPS_LOCK_ON;
  24. else
  25. USB_LED_CAPS_LOCK_OFF;
  26. if (usb_led & (1<<USB_LED_NUM_LOCK))
  27. USB_LED_NUM_LOCK_ON;
  28. else
  29. USB_LED_NUM_LOCK_OFF;
  30. if (usb_led & (1<<USB_LED_SCROLL_LOCK))
  31. USB_LED_SCROLL_LOCK_ON;
  32. else
  33. USB_LED_SCROLL_LOCK_OFF;
  34. led_set_user(usb_led);
  35. }