Hello
@favoriti
I have tried to install KextBeast, but problem still exist.
Then I tried to have a fresh install of High Sierra. This time, I put the option of FakeSMC (previously wasn't), does not install USB Limit and then update with KextBeast. The system properly shuts down when keyboard is connected directly to USB port, but not when the keyboard is connected through USB Hub.
Even with keyboard connected directly to USB port, and hub connected to other port with no devices attached to it, the system stil shutdown and then restart again.
At least, now I have a way to properly shut down the system (taking out the Hub before shutdown). Yet, it will be good if one day any update can fix the problem with the USB hub.
Thanks.