已存档
1
0
该仓库已被归档。您可以查看文件和克隆它,但不能推送、创建工单或合并请求。
keybrd/src/Code_LayerHold.h

22 行
548 B
C

2016-05-09 14:05:08 +00:00
#ifndef CODE_LAYERHOLD_H
#define CODE_LAYERHOLD_H
#include <inttypes.h>
#include <Code.h>
2016-05-28 21:16:32 +00:00
#include "LayerState.h"
2016-05-09 14:05:08 +00:00
2016-05-28 21:16:32 +00:00
/* Code_LayerHold calls LayerState when pressed to change activeLayer.
2016-05-09 14:05:08 +00:00
*/
class Code_LayerHold : public Code
{
private:
2016-09-20 01:46:03 +00:00
const uint8_t layerId;
2016-05-28 21:16:32 +00:00
LayerState& refLayerState;
2016-05-09 14:05:08 +00:00
public:
2016-09-20 01:46:03 +00:00
Code_LayerHold(const uint8_t layerId, LayerState& refLayerState)
: layerId(layerId), refLayerState(refLayerState) {}
2016-05-09 14:05:08 +00:00
virtual void press();
virtual void release();
};
#endif