If you have a 2009 cheesegrater, then you have a Mac Pro 4,1 which was made in 2009. Mac Pro 5,1 is the last model of the cheesegrater before the 7,1 came out which is also a cheesegrater, but a different look one.
When you ask for help in the Mac Pro forum, you need to specify what you have and put in your Mac Pro's specs. Like if you are asking a 4,1 question, you need to identify as 1.1-5.1, because there are 3 versions of them. The first cheesegrater (1,1-5,1), the trash can (6,1) and the second cheesegrater (71,). Otherwise, they won't answer or have the desire to help. That's just the way they are in the Mac Pro forum.
I have Mac Pro 5,1 myself which I have hooked up to the network with screen sharing activated for this type of issues where you get locked out of the screen with no keyboard access. Usually, it could be a hard drive issue and it can be fixed via Disk Utilities and sometimes it could be a corrupted update issues where you have no keyboard access. Having remote access through screen sharing using another Mac (any Mac runnning OSX) usually allow you to tunnel into your Mac and perform the necessary repairs. On my Mac Pro 5,1, I have 2 boot partitions and so if one gets corrupted and won't allow me to log in, I just simply tunnel my way from my other Macs back into the Mac Pro and select the 2nd boot partition and then regain my keyboard access. Once that is done, I simply re-clone my good boot partition back to my corrupt one. Faster than doing safe mode or internet recovery. My issue with this kind of issue is with my Nvidia Web driver and High Sierra updates. So if something goes wrong, I either can't see the screen or everything just froze. I don't know if you have HS or using Nvidia cards?!?
But if you haven't done this type of infrastructure recovery, then I would suggest that you get a Mac compatible keyboard, something like an old Mac wired keyboard from the G4 or G5 era where they are cheap and plentiful in thrift stores. Use that to access safe mode and your boot manager.
Also, don't forget that your Mac Pro has a coin cell battery "BR2032" that goes dead after a few years and can give you similar symptoms. If that is the case, you need to get a new BR2032 or a CR2032 replacement battery. BR2032 is harder to find than CR2032, but you can use CR2032 as a replacement.
Last but not least; one of your Mac Pro's CPU may have died, RAM issues and overheating on the Northbridge which in this case can be quite tricky to diagnose and it most likely go into some type of kernel panic and froze.