Hi,
There have been many changes to how OSX manages MIDI as well as the move to 64bit only starting with Catalina. Many legacy MIDI drivers no longer work due to the need to be updated. Some devices do not have drivers for OSX provided by the vendor and the used to be "plug and play". Unfortunately due to the changes noted above they no longer will work.
You can try:
Disconnect the keyboard
Delete the existing device in the MIDT Setup
Shutdown, Restart
Launch Apple MIDI Setup
Connect the keyboard directly to the computer ( no USB hub )
Is the device recognized? If yes,
Enter "Test" mode, hit a key. Do you hear a bing? If yes the keys are being recognized. If no sound the device is not being properly recognized.
You can try an app called MIDIView ( free) to see if any MIDI messages are being sent or not.
If the keyboard is not being recognized properly you may be out of luck.
I have seen an uptick with Midi Issue with since Logic 10.5 ad here are my observations and tips:
1) Make sure ALL drivers (if required) are current and supported (Critical )
2) No USB hubs in the data chain to MIDI devices
3) Always start from a cold boot, no wake from sleep
4) No changing of accounts ( logout / login )
5) If using a combination of USB direct and a MIDI multi-port interface leave Port A open on the multi-port.
These steps solved about 99% of my ( and fellow musicians ) MIDI issues.
Hope this helps
( If this was helpful please mark as such or mark as solved if that is the case