Generally speaking of course, you would never direct the signal from an amplified output into a line level input, however with headphones the level of amplification required is so small that the signal will typically be even less what a line level input is expecting. So do you want to headphone output signal further?
Basically, if you connect a headphone output signal to a several thousand ohm line level input it will behave pretty much like a line level signal.
Therefore, I would try it as is first to see if your results are acceptable. The output level should range somewhere within what a line level range should be although you might have to turn the volume up more than you would have to if it were a line level out.
Just start with the volumes all the way down, then turn your monitor levels somewhere in the middle and then turn up the keyboard level and see how good the sound is.
You may be perfectly happy with the results, otherwise you could try a headphone amp, but be careful with the volumes
Here's a good article on this topic which should address any concerns: