There are two way's to save controller bindings in retroarch, the first is in the main UI under Input where you can also adjust hotkeys, it sounds like you used this method. For this method you need to be in Retroarch without a core or game loaded, and once you have finished you go back to the first part of the menu and save current configuration. See first two screenshots.
The way to save per core controller configs is to to load a game with the core you want to change the controls for and enter the quick menu then controls, change the controls to how you want them, then in the same menu is a "save core remap" option, just select that when you are done and it will save the controls for just that core and auto load them when you next launch that core. See screenshots 3 and 4.
Hope that helps.