Skip to content

Commit 93a78fb

Browse files
committed
Leave the built-in keys out of the pressed keys the log prints
1 parent 0ea47d0 commit 93a78fb

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎src/main/java/mousemaster/ComboWatcher.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,8 +1025,12 @@ else if (lastMoveIsWaitingMove) {
10251025
}
10261026
if (processingSet.mustBeEaten())
10271027
message.append(", eaten");
1028-
if (!logRedactKeys && !currentlyPressedComboKeys.isEmpty())
1029-
message.append(", pressed ").append(currentlyPressedComboKeys);
1028+
// Built-in keys crowd out the ones actually typed.
1029+
List<Key> pressedKeys = currentlyPressedComboKeys.stream()
1030+
.filter(key -> !BuiltInVirtualKey.KEYS.contains(key))
1031+
.toList();
1032+
if (!logRedactKeys && !pressedKeys.isEmpty())
1033+
message.append(", pressed ").append(pressedKeys);
10301034
if (!logRedactKeys) {
10311035
if (logger.isTraceEnabled())
10321036
message.append(", buffered ").append(comboPreparation);

0 commit comments

Comments
 (0)