The problem is that there is the need to have a MIDI port with a device available, otherwise Cubase won't be able to record the notes. Using a VSTi keyboard in its window doesn't allows this, unless you are lucky enough to have one of the rare VSTis that can transmit MIDI output, in order to be available as a MIDI port in the 'Input routing' selector of the track inspector. As an example, BFD2 can do so, but there are not many of them.
A workaround is to use Cubase virtual keyboard (<right click> on the transport bar and select it in the popup menu) : it is limited in the way that there is only a fixed velocity available while playing, adjustable with a cursor. But, at least, there is a piano like option that allows you to play directly on 3 octaves and yes, you can record notes, even with glissando this way. There are also pitch bend and modulation adjustments available.
But to be able to record with it, you have to select 'All MIDI inputs' in the 'Input routing' selector of the track inspector. Using any other port will not allow you to record what you play with it.
DAW : i7-870 (HT enabled) - Asus P7-P55D-E - 16 Gb DDR3-1600 - 2 x WD Black Caviar 1 Tb - Radeon 6450 GPU (512 Mb) - Windows 7 Pro SP1 (64) / E-Mu 1616m PCIe + Behringer ADA8000
Soft & plug-ins : Cubase 5.1.1 (64) & 6.5.5 (64) + HSO / Emulator X3 / TruePianos / Ivory II / GSi Mr Ray73 MkII & VB3 / Sylenth1 / Alchemy / Loomer String / Arturia MMV / BFD2 / Ariesverb
Gear : Studiologic VMK-188+ / Akai MPD32 controller / Akai ME30P MIDI Patchbay / Korg 05RW / Roland D110 / Yamaha TX802 / Zoom G9.2tt / My really old ones (pre-MIDI era) : ARP Odyssey + Korg MS20