I'd like a utility that monitors the keyboard and pops up a warning when it detects that any key remains activated (electrically in the down position) for a user-settable period of time (the key may physically be fully up, but the key switch may remain electrically activated as it would be if the key were down). The warning message should identify the key that triggered it. The user interface should include a Settings or Options dialog that allows you to toggle monitoring on and off, turn off monitoring for a specific key or several specific keys, and set the timer duration for triggering the popup warning. The timer setting for the entire keyboard should be adjustable, and you should be able to override that setting with individual timers for individual keys. In other words, one setting for the entire keyboard and another setting for individual keys that would take precedence so that you could still monitor all keys but have a different timer duration set for certain keys of your choosing. You'd be able to set a timer for each individual key to a longer or shorter duration than the timer for the entire keyboard. I'd guess that most users wouldn't set a separate timer for more than a few keys, though.
The motivation for this request is that sometimes a key switch will stick after being held down for a while. I see this happen occasionally with certain keys, mostly the Shift and Control keys, as these keys are used in conjunction with the mouse when selecting items in a list. It happens to me mostly when sorting or deleting email and when choosing files in Explorer or a folder window for copying, moving, or deletion. As there are several keys that are or can be used as modifiers, and most of them are duplicated, it can be confusing and difficult to determine what is going on when one of these keys gets stuck.