jack-keyboard is a program that provides the function of a MIDI hardware keyboard. I don’t recommend it (or any virtual keyboard) for real-time playing but it can be useful for testing and for holding a note while tuning. I tested jack-keyboard version 2.7.1.
I like the “sustain” feature, which works like a sustain pedal. I press and hold the space bar and then click the desired note. I then release the space bar. To stop the note, I either press and release the space bar a second time, click the Sustain button, or click the note again.
It’s also possible to produce notes via the computer keyboard.
For more information about jack-keyboard, see its man page or the documentation at its web site: http://jack-keyboard.sourceforge.net/
UPDATE 28 JULY 2015: Pressing the Escape key is a “MIDI Panic” button (that presumably sends All Notes Off).
Other Virtual Keyboards
It appears that vmpk (Virtual MIDI Piano Keyboard) may be the most popular virtual keyboard program. I tried vmpk version 0.6.0 but it didn’t work on my system. I saw the following error:
[steve@audio]$ vmpk This application failed to start because it could not find or load the Qt platform plugin "xcb". Available platform plugins are: eglfs, kms, linuxfb, minimal, minimalegl, offscreen, xcb. Reinstalling the application may fix this problem. Aborted (core dumped)
I suspect I have a missing indirect dependency.
Another virtual keyboard is vkeybd. I didn’t try it because it appears to be older and more basic than jack-keyboard.