When playing on my keyboard, the Cubase “MIDI IN activity” bar lights up, so that’s OK.
However, the record enabled track remains silent (its sound bar indeed shows no activity). It’s MIDI input is set to “all midi inputs” and its Channel to “any”, so that couldn’t be the problem.
When I play the track’s VST instrument through the on-screen “Edit Instrument” keyboard, the sound is there alright, and the track’s sound bar lights up.
Sorry, it was a problem with the keyboard. It was sending out MIDI alright, but only for a single note. When reset to the whole keyboard, everything was OK.