Skip to content

Commit 32a2fab

Browse files
committed
Fix KeyInfo update
1 parent 80f1c6b commit 32a2fab

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

OS/Framework/KeyEvent/KeyInfo.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ bool KeyInfo::Update(KeyConfig& config, Fract16 new_value) {
9090
debouncing = false;
9191
// MatrixOS::Logging::LogVerbose("KeyInfo", "RELEASE_DEBOUNCING -> RELEASED");
9292
lastEventTime = timeNow;
93+
values[0] = config.apply_curve ? ApplyVelocityCurve(config, new_value) : new_value;
9394
return true & !cleared;
9495
}
9596
else if (ABOVE_THRESHOLD && timeNow - lastEventTime > config.debounce) {
@@ -153,6 +154,7 @@ bool KeyInfo::Update(KeyConfig& config, Fract16 new_value) {
153154
state = RELEASED;
154155
// MatrixOS::Logging::LogVerbose("KeyInfo", "ACTIVATED -> RELEASED");
155156
lastEventTime = timeNow;
157+
values[0] = 0;
156158
return true & !cleared;
157159
}
158160
}

0 commit comments

Comments
 (0)