Update testcase for issue 978

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1024/head
Michael Richters 4 years ago
parent b0478b43d8
commit 5d69eca65d
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -18,10 +18,6 @@
#include "./common.h" #include "./common.h"
#undef min
#undef max
#include <iostream>
// *INDENT-OFF* // *INDENT-OFF*
KEYMAPS( KEYMAPS(
[0] = KEYMAP_STACKED [0] = KEYMAP_STACKED
@ -48,9 +44,12 @@ namespace plugin {
class IdleKeyDetector : public kaleidoscope::Plugin { class IdleKeyDetector : public kaleidoscope::Plugin {
public: public:
EventHandlerResult onKeyswitchEvent(Key &key, KeyAddr key_addr, uint8_t key_state) { // handleKeyswitchEvent() is going to mask the underlying issue if it recurs,
if (key_addr == KeyAddr{0, 0} && key_state == 0) { // but leaving this here is better than nothing.
handleKeyswitchEvent(Key_X, key_addr, IS_PRESSED | WAS_PRESSED); EventHandlerResult onKeyswitchEvent(KeyEvent &event) {
if (event.addr == KeyAddr{0, 0} && event.state == 0) {
event.key = Key_X;
event.state = IS_PRESSED;
} }
return EventHandlerResult::OK; return EventHandlerResult::OK;
} }

Loading…
Cancel
Save