I have a (musical type) keyboard with a usb connection for midi input. I am able to connect with drumstick virtual piano and see the keys geing pressed on screen and also to hear from the keyboard when I press keys on the computer. What is a program I can use to record from the keyboard as midi input?
Any MIDI editor will work. The most popular ones include Rosegarden, QTractor. The first one is much more complex and feature-packed, while QTractor is lighter and more oriented towards audio. You can find several more in the Ubuntu Software Center, like MusE, Scolily or Canorus. Check which one you will like most!