Should you add code to the endPress() method in keyboard.js to ignore presses on disabled keys?  Then you wouldn't be dependent on this disabled key being the caps lock.