Does somebody knows a way to check if Capslock is on using Python 2.6?
EDIT: I've already seen this solution Python - How to get current keylock status?, but it gave me a "string out of range" error. If you know why it would be helpful as well!
Does somebody knows a way to check if Capslock is on using Python 2.6?
EDIT: I've already seen this solution Python - How to get current keylock status?, but it gave me a "string out of range" error. If you know why it would be helpful as well!
import commands
CapsLock_status=commands.getoutput('xset q | grep Caps')[21:24]
print "CapsLock status is : %s" %CapsLock_status