Midi - you don't need midi equipment to use the programs.
Use a laptop or screen that can be viewed while at the keyboard if you need sheet music to follow or print sheet music from the midi application.
There are thousands of free classical, jazz, pop, etc., midi songs available online. Some songs can be downloaded with multiple parts/instruments and you can mute any track (the keyboard track) and play along with accompaniment. I find it so much easier to play music after I've heard it played (especially jazz for the odd timings). I can play until my fingers get sore with accompaniment and a large song selection. No boring scales. Learn a simple song? Now hit transpose and learn it in every key. Change the tempo and play it keeping time but twice as fast. Difficult passage, slow it down and listen, loop it and learn it slow and then bring it up to tempo as written.
The applications will allow you to easily transpose keys, change tempo up or down, loop a difficult section, have built-in metronome and display a music score with automatic page turning while playing. If you write music you can sing or play an instrument into you computer microphone and some of the apps will write the sheet music.
If your keyboard is midi capable you can record. Many apps have accompaniment features that will play-along with your chord/melody changes.
I highly recommend a free package before you purchase any application as the commercial apps have too many features and can overload you with complexity at first. You only need to learn: play, forward, rewind, loop, transpose, change tempo and print sheet music to use successfully as a training tool.
A free windows midi app I've set up for many kids:
Mac and Linux have too many free midi apps to list, just do an Internet search.