I am simulating the button press using keyboard module. I have following code:
keyboard.press('num lock')# switching on the num lock key
##do some operation##
keyboard.press('num lock')# num lock key is still On
On second statement num lock key is not pressed down. Please help me to get it resolved.
I have tried with pyautogui,still its not resolved.
pyautogui.press("num lock")
Thanks Simun
The string you need to pass is 'numlock'
, not 'num lock'
:
>>> pyautogui.press("numlock")