2016-09-17 18:31:14 +00:00
|
|
|
#ifndef KEY_LAYEREDCODESC_H
|
|
|
|
#define KEY_LAYEREDCODESC_H
|
2016-05-09 14:05:08 +00:00
|
|
|
#include <Arduino.h>
|
|
|
|
#include <inttypes.h>
|
2016-09-17 18:31:14 +00:00
|
|
|
#include <Key_LayeredCodeScBase.h>
|
2016-05-28 21:16:32 +00:00
|
|
|
#include <LayerStateInterface.h>
|
2016-05-09 14:05:08 +00:00
|
|
|
|
2016-09-17 18:31:14 +00:00
|
|
|
/* Class Key_LayeredCodeSc is a 2-layer code, one object for each layer e.g.
|
2016-05-09 14:05:08 +00:00
|
|
|
layer0: ms_up //mouse up
|
|
|
|
layer1: KEY_UP //up arrow
|
2016-09-20 01:46:03 +00:00
|
|
|
When the key is pressed, the active layerId is retrieved from refLayerState,
|
2016-05-09 14:05:08 +00:00
|
|
|
and the object for the active layer is sent to USB.
|
|
|
|
*/
|
2016-09-17 18:31:14 +00:00
|
|
|
class Key_LayeredCodeSc : public Key_LayeredCodeScBase
|
2016-05-09 14:05:08 +00:00
|
|
|
{
|
|
|
|
private:
|
2016-05-28 21:16:32 +00:00
|
|
|
static LayerStateInterface& refLayerState;
|
2016-05-09 14:05:08 +00:00
|
|
|
public:
|
2016-09-17 18:31:14 +00:00
|
|
|
Key_LayeredCodeSc(Code& refCode0, const uint16_t scancode1)
|
|
|
|
: Key_LayeredCodeScBase(refCode0, scancode1, 0) { }
|
2016-05-09 14:05:08 +00:00
|
|
|
virtual void press();
|
|
|
|
};
|
|
|
|
#endif
|