The Linux kernel's drivers/input/keyboard/atkbd.c and every hobby OS keyboard driver on the OSDev wiki decode Scan Code Set 1 with this exact make-code/break-code (bit 7) distinction and a circular buffer to decouple the ISR from character processing. Forgetting to track Shift/Caps-Lock state independently from the base scancode table is a classic bug that makes a keyboard driver type the wrong case entirely.