Skip to content

Commit 9015c3c

Browse files
committed
Comments
1 parent a2dac0a commit 9015c3c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

frontend/src/ts/test/test-input.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ function updateOverlap(now: number): void {
453453
}
454454

455455
export function resetKeypressTimings(carryover: boolean): void {
456+
// Reset
456457
keypressTimings = {
457458
spacing: {
458459
first: -1,
@@ -471,9 +472,9 @@ export function resetKeypressTimings(carryover: boolean): void {
471472
noCodeIndex = 0;
472473

473474
if (carryover) {
474-
//because keydown triggers before input, we need to grab the first keypress data here and carry it over
475+
// Because keydown triggers before input, we need to grab the first keypress data here and carry it over
475476

476-
//take the key with the largest index
477+
// Take the key with the largest index
477478
const lastKey = Object.keys(keyDownData).reduce((a, b) => {
478479
const aIndex = keyDownData[a]?.index;
479480
const bIndex = keyDownData[b]?.index;
@@ -482,10 +483,10 @@ export function resetKeypressTimings(carryover: boolean): void {
482483
return aIndex > bIndex ? a : b;
483484
}, "");
484485

485-
//get the data
486+
// Get the data
486487
const lastKeyData = keyDownData[lastKey];
487488

488-
//carry over
489+
// Carry over
489490
if (lastKeyData !== undefined) {
490491
keypressTimings = {
491492
spacing: {
@@ -499,7 +500,7 @@ export function resetKeypressTimings(carryover: boolean): void {
499500
};
500501
keyDownData[lastKey] = {
501502
timestamp: lastKeyData.timestamp,
502-
// make sure to set it to the first index
503+
// Make sure to set it to the first index
503504
index: 0,
504505
};
505506
}

0 commit comments

Comments
 (0)