MIDI on (old) Casio Celviano AP-65R

Help!
“All I want to do…” is record the sound from my old elec piano (Casio Celviano AP-65R) into my PC (Windows 10). I have the latest version of Audacity.

Struggling with how to configure either the Audacity s/w, and / or my PC and / or the piano to be able to record via a MIDI cable. The only permutation that works is when Audacity is listening to the PC’s external mic, and so picks up all the noise in the room - which is precisely what I want to avoid!

The “MIDI” light on the MIDI cable illuminates when plugged into the PC’s USB, but the “In” and “Out” lights remain dark. Both the MIDI In and Out DIN plugs are plugged into the corresponding sockets on the back of the piano.

I’m sufficiently techie (ex programmer) but MIDI isn’t something I’ve played with before; I’m new to Audacity too. I can play piano!

Probably some simple permutation of keystrokes somewhere, but I can’t find them (in over a couple of hours of manual searching).

Over to you … Thanks in advance, Andy.

Audacity can’t record MIDI data.

If you want to record with Audacity, you have to record “audio” from the keyboard.
What audio outputs does your Casio have?
What audio inputs does your computer have?

If you want to record MIDI, then you need a “MIDI sequencer” program, or a “DAW” (digital audio workstation) that has a built-in MIDI sequencer.
Examples include: Reaper, Cakewalk, Muse, Muse Score. There are others.