Adapt DynamicTapDance plugin to KeyEvent handlers

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

@ -19,6 +19,8 @@
#include <Kaleidoscope-EEPROM-Settings.h>
#include "Kaleidoscope-FocusSerial.h"
#include "kaleidoscope/Runtime.h"
#include "kaleidoscope/KeyEvent.h"
namespace kaleidoscope {
namespace plugin {
@ -72,14 +74,14 @@ bool DynamicTapDance::dance(uint8_t tap_dance_index, KeyAddr key_addr,
break;
case TapDance::Interrupt:
case TapDance::Timeout:
handleKeyswitchEvent(key, key_addr, IS_PRESSED | INJECTED);
Runtime.handleKeyEvent(KeyEvent(key_addr, IS_PRESSED, key));
break;
case TapDance::Hold:
handleKeyswitchEvent(key, key_addr, IS_PRESSED | WAS_PRESSED | INJECTED);
Runtime.handleKeyEvent(KeyEvent(key_addr, IS_PRESSED | WAS_PRESSED, key));
break;
case TapDance::Release:
kaleidoscope::Runtime.hid().keyboard().sendReport();
handleKeyswitchEvent(key, key_addr, WAS_PRESSED | INJECTED);
//kaleidoscope::Runtime.hid().keyboard().sendReport();
Runtime.handleKeyEvent(KeyEvent(key_addr, WAS_PRESSED, key));
break;
}

Loading…
Cancel
Save