This is amazing. I just tried it and it works like a charm. Is there a way to conditionally enable/disable the script? I have a 2-in-1 laptop with detachable keyboard. It would be great to disable the script in laptop mode (when keyboard is present).