All my automated tasks are built on selenium
but I was actually running into some issues with it lately when trying to automate tasks on my laptop, which made me work as well with the keyboard
library. It seems that PyAutoGUI can solve this issue, I will give it a try - thanks for sharing!
RE: PyAutoGUI - Automate Repetitive Tasks With Python