Do I need a DI Box? Keyboard Connections
A DI (Direct Box) is not always necessary, but is a good idea and removes some potential hum. A good DI also protects both sides and eliminates noise. It may be unnecessary, but is good to have on hand in case you need it.
As long as your XLR outs on the keyboard have a ground lift you don’t need a DI box.
Powered audio sources like keyboards and audio interfaces should use passive DIs. Quality passive DI transformers transmit the audio spectrum faithfully but dampen other frequencies. They block DC current from dodgy circuitry. They limit transient noise, like when plugging/unplugging, and they clip too-hot signals in a pleasant way.
The cheapest solution for hum is to use a direct box with a ground lift switch engaged.
Check out this graphic for ideas about how to connect: