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_AutoShift.cpp

31 lines
585 B
C++
Raw Normal View History

2016-05-09 14:05:08 +00:00
#include "Code_AutoShift.h"
bool Code_AutoShift::isShifted() const
{
//if a shift key is pressed return true else return false
for (uint8_t i = 0; i < shiftCount; i++)
{
if (ptrsShifts[i]->isPressed())
{
return true;
}
}
return false;
}
void Code_AutoShift::releaseAllShifts() const
{
for (uint8_t i = 0; i < shiftCount; i++)
{
ptrsShifts[i]->unpress();
}
}
void Code_AutoShift::restoreAllShifts() const
{
for (uint8_t i = 0; i < shiftCount; i++)
{
ptrsShifts[i]->restorePressed();
}
}