written for http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_21977959.html
How to check keyboard led status by reading keystate.

Source Code