Hi iphis,
I suggest that you just sit down one afternoon ( a couple of hours should be enough) and memorise everything.
It is important to understand the relationship between key signatures, but ultimately you its very useful to know what key you are in and simple if you can look at a piece or even section and be able to tell what the composer is doing.
It is like times tables. When you were a kid (or at some stage in life), if you were just made to memorise it, rather than counting with fingers, you should be much quicker at it now. It is useful and important enough to put in the effort.
Here are some amusing ways of memorising the order of sharps and flats
https://www.pianostreet.com/smf/index.php/topic,10012.0.htmlto get you started.
Once you have the major scale the minor scales are easy.