Skip to content

Commit

Permalink
Only snap on key _downs_ (#6517)
Browse files Browse the repository at this point in the history
## Summary of the Pull Request
Prior to #6309, we'd only snap on input for non-modifier key_down_ events. #6423 fixed this for modifier keys, but didn't fix this for keyups.

## References
* #6423 was an incomplete fix to this problem, which caused this regression

## PR Checklist
* [x] Closes #6481
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated
  • Loading branch information
zadjii-msft authored Jun 15, 2020
1 parent 332d174 commit 888e724
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cascadia/TerminalCore/Terminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ bool Terminal::SendKeyEvent(const WORD vkey,
{
// GH#6423 - don't snap on this key if the key that was pressed was a
// modifier key. We'll wait for a real keystroke to snap to the bottom.
if (!KeyEvent::IsModifierKey(vkey))
// GH#6481 - Additionally, make sure the key was actually pressed. This
// check will make sure we behave the same as before GH#6309
if (!KeyEvent::IsModifierKey(vkey) && keyDown)
{
TrySnapOnInput();
}
Expand Down

0 comments on commit 888e724

Please sign in to comment.