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_ScNS.h 773B

1234567891011121314151617181920212223
  1. #ifndef CODE_SCNS_H
  2. #define CODE_SCNS_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include "Code_AutoShift.h"
  6. /* Class Code_ScNS is composed of one scancode, which it sends when press() or release() is called.
  7. autoShift insures that all MODIFIERKEY_SHIFTs are released.
  8. Letters will still print as capital if CapsLck is on.
  9. "ScNS" stands for Scancode Not Shifted.
  10. If scancode is a letter, CapsLck will invert the case.
  11. Normally this is not a problem because most layer schemes control letter case by shift.
  12. */
  13. class Code_ScNS: public Code_AutoShift
  14. {
  15. private:
  16. const uint16_t scancode;
  17. public:
  18. Code_ScNS(const uint16_t scancode): scancode(scancode) { }
  19. virtual void press();
  20. virtual void release();
  21. };
  22. #endif