My pseudocode as I do this problem.

Select all checkboxes and store them in a variable.

Add eventListeners to all of them.

At the occurence of an event call your function that handles logic.

In that function check if they had shift pressed down AND that they're checking it.

If it meets those two, we now want to check if it's in between the checkboxes we initially clicked and the second we shift clicked.

For each checkbox we check if it's either the first or last checkbox we clicked.

Then identify ourselves as in between and flip it to true.

Once we finally reach the latest checkbox clicked, flip in between to false and it will stop checking boxes after this point.

Hold shift to select all should be working.