Change back to previous view by clicking button again in fly mode

Hi,
I needed to reinstall windows and lost all my decade old controller settings. The thing is, I had my system setup the way, that clicking on specific buttons set for the view modes, like cockpit mode and weapon visor, brings me into this mode and clicking it again brings me back to the previous view. It there a way to set that up? Didn’t find any, but I think it was possible before.