I've used a software MIDI monitor (Kmidimon) which confirms the description above. To me this seems like a Casio bug either hardware or firmware. This is totally repeatable and so far I have not been able to send more than one note event (off or on, Midi mode 3) without changing the program/keyboard sound. However, driving a software synth (Zynaddsubfx) from the Casio keyboard exhibits the strange phenomenon that only a single Note Event gets sent, changing the Program on the Casio (ie the keyboard sound) sends a program change event after which another single note event can be sent. Driving the Casio from a software step sequencer works fine. The Casio has 5-pin DIN connections and the netbook is USB so I've bought a DIN/USB converter.
I'm just getting back into MIDI after a LONG outage and am attempting to connect my Casio MT240 keyboard to a Linux netbook.