You weren't already doing that method of bounds checking/correcting? I was doing it for brevity
even before I learned of branchless coding, which helps modern CPUs go faster.
Someday I'll need to look at the keyboard in a time critical section of code, and will use _KEYHIT.
We dinosaurs use INKEY$, which is slow, but a mite friendlier (no arcane keycode values).