How did you create the custom keyboard layout? Using a plug-in? Or do mean the custom command settings? My custom command settings are still there. The presets are stored in the User library if you need to restore them.
~/Library/Application Support/Aperture/Command Sets/My Commands.apcommands
If you used plug-ins to configure Aperture, check out if they are still compatible. The recent version accepts only sandboxed plug-ins:
I had the same issue after just upgrading to 3.4.1. I turns out that Aperture didn't erase my commands, it just isn't loading them for some odd reason.
Go to ~ /Library/Application Support/Aperture/Command Sets/ this is where your custom commands are located. It should be in there. Let me know if it works out for you.