keybrd library is an open source library for creating custom-keyboard firmware.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Repozitorijs ir arhivēts. Tam var aplūkot failus un to var klonēt, bet nevar iesūtīt jaunas izmaiņas, kā arī atvērt jaunas problēmas/izmaiņu pieprasījumus.

1234567891011121314151617181920212223242526272829303132
  1. #include "LayerState.h"
  2. void LayerState::hold(const uint8_t layerId)
  3. {
  4. setActiveLayer(layerId);
  5. }
  6. void LayerState::unhold(const uint8_t layerId)
  7. {
  8. if (layerId == activeLayer);
  9. {
  10. setActiveLayer(lockedLayer);
  11. }
  12. }
  13. void LayerState::lock(const uint8_t layerId)
  14. {
  15. setActiveLayer(layerId);
  16. lockedLayer = layerId;
  17. }
  18. /* Derived classes override setActiveLayer() to also set LED indicator lights e.g. LayerState_LED
  19. */
  20. void LayerState::setActiveLayer(const uint8_t layerId)
  21. {
  22. activeLayer = layerId;
  23. }
  24. uint8_t LayerState::getActiveLayer()
  25. {
  26. return activeLayer;
  27. }