support setting LEDs

This is a piece of code which I use for setting LED status.

This is needed in my code which uses .grab(), what in particular disables handling of Caps-Lock/Num-Lock by the system and I needed a way to do this programmatically.

Feel free to merge it into master if you think it's worth it.