You may have two issues to contend with....
Firstly, did you install the latest Yamaha Midi Drivers (V1.3.2) for OS X and your keyboard?
http://download.yamaha.com/usb_midi/
If not do so and try them out...
But.. problem #2....
Yamaha have not released updated drivers so far that are confirmed as working with Yosemite...
So the latest ones may or may not work correctly.
Note: Are you plugging your KX8 directly into your Mac via USB?
If not and you have it plugged into the back of the Apogee, that won't work because the KX8 is not CoreMdid compatible.. and requires drivers installed on your Mac to use the USB connection...
Alternate solution:
If you cannot get the KX8 to work with the older drivers and yosemite,
Buy a good quality midi interface... (not one of the cheap midi to USB cord types) that works well with Yosemite..
Any of the iConnect range will work perfectly. I use an iConnectMidi 2+ which allows midi to midi connections but also the use of Audio/midi to and from an iPad to LPX
http://www.iconnectivity.com/iConnectMIDI2plus
Also, watch this for more info....
https://www.youtube.com/watch?v=AUYUx3KOHwg
and then connect that to your Mac and then connect the KX8 to the midi interface via its Midi ports.... rather that try and use USB from the KX8 to your Mac.. (and therefore no need for drivers either) and it should work without issue.