Archived
1
0
This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
keybrd/src/Code_Shift.h
2016-05-09 08:05:08 -06:00

24 lines
725 B
C++

#ifndef CODE_SHIFT_H
#define CODE_SHIFT_H
#include <Arduino.h>
#include <inttypes.h>
#include <Code.h>
/* Class Code_Shift sends shift scancode for multi-layered keybrds.
Explanation in Code_AutoShift.h
*/
class Code_Shift : public Code
{
private:
bool pressed; //state of physical shift key, false means released
const uint16_t scancode; //MODIFIERKEY_LEFT_SHIFT or MODIFIERKEY_RIGHT_SHIFT
public:
Code_Shift(const uint16_t scancode) : pressed(false), scancode(scancode) {}
virtual void press();
virtual void release();
bool isPressed();
void unpress();
void restorePressed();
};
#endif