keybrd library is an open source library for creating custom-keyboard firmware.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

Code_LayeredCodeSc.h 780B

1234567891011121314151617181920212223
  1. #ifndef CODE_LAYEREDCODESC_H
  2. #define CODE_LAYEREDCODESC_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <Code_LayeredCodeScBase.h>
  6. #include <StateLayersInterface.h>
  7. /* Class Code_LayeredCodeSc is a 2-layer code, one object for each layer e.g.
  8. layer0: ms_up //mouse up
  9. layer1: KEY_UP //up arrow
  10. When the key is pressed, the active layer is retrieved from refStateLayers,
  11. and the object for the active layer is sent to USB.
  12. */
  13. class Code_LayeredCodeSc : public Code_LayeredCodeScBase
  14. {
  15. private:
  16. static StateLayersInterface& refStateLayers;
  17. public:
  18. Code_LayeredCodeSc(Code& refCode0, const uint16_t scancode1)
  19. : Code_LayeredCodeScBase(refCode0, scancode1, 0) { }
  20. virtual void press();
  21. };
  22. #endif