Midi keyboard lost

Hi,

Are you talking about the common MIDI Input, or the MIDI Remote only? If you are talking about the MIDI Remote, there is a known issue, described (for example) here.

If you are talking about the MIDI Port in general, Cubase takes the MIDI Port from the system (are you on Windows or Mac)? Can you see the device in the Studio > Studio Setup > MIDI Ports Setup? Can you see the device on the system level?