I don’t have a MS keyboard. You might look to see if there is a “helper” command for the KB and just add another line to the mouse script with the same nohup syntax.
Randy
I checked and found my keyboard helper file in a similar location. I made a 2nd line in the shell script for it with the file path:
nohup /Library/PreferencePanes/Microsoft\ Keyboard.prefPane/Contents/Resources/MicrosoftKeyboardHelper.app/Contents/MacOS/MicrosoftKeyboardHelper > /dev/null 2>&1 &
I renamed my script file from "mouse" to "DesktopSet" since it now includes keyboard and mouse, and made the corresponding changes in the crontab.
I want to thank Randy for the clarifications. I hadn't quite realized that his shell script ended with the one (now two) nohup lines and that "crontab -e" was the Terminal command to edit the existing crontab, and ":wq!" the vi command to save the additions and re-enter the normal Terminal mode. I had originally thought the shell script included all the cron stuff as well. I am still not sure about the "exit" command below the 2 shell script lines but I believe it is extraneous if I use a text editor rather than vi to create the script. Hope I have all this right, now.
I still won't try this unless my current configuration becomes unstable again because it has been too much work getting the keyboard and mouse to behave.