Replies: 1 comment
-
I managed to get it work on the Cardputer using this temporary quick workaround. There must be a better solution that will work on all M5 Stack devices, or at least a way to set the button handler. The workaround is to edit void Control::checkButtons()
{
aOldPressed = aPressed;
aPressed = M5Cardputer.Keyboard.isKeyPressed(';');
aButtonEvent.pressed = !aOldPressed && aPressed;
aButtonEvent.released = aOldPressed && !aPressed;
bOldPressed = bPressed;
bPressed = M5Cardputer.Keyboard.isKeyPressed('.');
bButtonEvent.pressed = !bOldPressed && bPressed;
bButtonEvent.released = bOldPressed && !bPressed;
cOldPressed = cPressed;
cPressed = M5Cardputer.Keyboard.isKeyPressed(KEY_ENTER);
cButtonEvent.pressed = !cOldPressed && cPressed;
cButtonEvent.released = cOldPressed && !cPressed;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am new to the M5 ecosystem. I tried to use this library for my project on the M5 Cardputer. I realized that the Cardputer only has BtnA. I looked up at the
M5Unified.h
source code file and see only BtnA is registered. Is there a way to actually bind or override the keys to instead use other button (i.e. the keyboard)?Beta Was this translation helpful? Give feedback.
All reactions