mirror of https://github.com/JorjBauer/aiie.git
normalize keypress tracking
This commit is contained in:
parent
15d8fd8745
commit
baa2516b52
|
@ -113,6 +113,10 @@ uint8_t AppleKeyboard::translateKeyWithModifiers(uint8_t k)
|
||||||
|
|
||||||
void AppleKeyboard::keyDepressed(uint8_t k)
|
void AppleKeyboard::keyDepressed(uint8_t k)
|
||||||
{
|
{
|
||||||
|
if (k >= 'A' && k <= 'Z') {
|
||||||
|
k = k - 'A' + 'a';
|
||||||
|
}
|
||||||
|
|
||||||
keysDown[k] = true;
|
keysDown[k] = true;
|
||||||
|
|
||||||
// If it's not a virtual key, then set the anyKeyDown flag
|
// If it's not a virtual key, then set the anyKeyDown flag
|
||||||
|
@ -142,6 +146,10 @@ void AppleKeyboard::keyDepressed(uint8_t k)
|
||||||
|
|
||||||
void AppleKeyboard::keyReleased(uint8_t k)
|
void AppleKeyboard::keyReleased(uint8_t k)
|
||||||
{
|
{
|
||||||
|
if (k >= 'A' && k <= 'Z') {
|
||||||
|
k = k - 'A' + 'a';
|
||||||
|
}
|
||||||
|
|
||||||
keysDown[k] = false;
|
keysDown[k] = false;
|
||||||
|
|
||||||
// Special handling: apple keys
|
// Special handling: apple keys
|
||||||
|
|
Loading…
Reference in New Issue