If you're like most pianists, you can play in a few keys like C, F and G very well. You're good in D, A and Bb too, but you have to think about the sharps and flats a little. However, when you see sheet music in a "hard" key like Db, there are just too many flats for you to feel comfortable with.
The traditional method of learning all the major keys is to buy a book of scales and start learning them one at a time. There's nothing wrong with this, but it won't get you where you want to go. You can practice scales for hours (and indeed you should) but you may still feel lost when playing a real piece of music in a key with lots of sharps or flats.
So what do you do to become comfortable in all 12 keys?
Rather than intensely practicing this, I've found that it's more a matter of "spending time" in each key. It doesn't matter if you prefer Bach or heavy metal. You just need to play in each key until it starts to feel natural to you. And it will; with some consistent practice and over time. (BTW, the rock singer Ozzy Osborne has noted that he and his band intentionally write songs in a wide range of keys. They want to challenge themselves and also be different from the majority of rockers.)
Start by learning which notes are in each major key, but don't try to memorize them all at once. And don't rush the process, which is a long-term goal. You may want to begin by focusing on 1 major key each week for 12 weeks. Or 1 per month for 12 months. If you're classically oriented, find a piece in each key. They can be simple or complex, and you don't even have to learn them perfectly. For our purposes you want to play each piece enough so you begin "thinking" in the new key. It's like when you start "thinking" in a foreign language. That's when you know you're beginning to really learn it!
A great way to become comfortable playing in all the keys is to learn to improvise over a basic chord progression and then gradually take it through all 12 keys. This is lot of fun and also teaches you the various keys in a musical and practical manner. It's an amazing experience when you suddenly find that F# major is easy for you!
The good news is that once you get it, you'll have it forever.
Here are some free piano improv lessons for you to enjoy. Have fun!
Take your left hand playing to a new level with my free ebook: Left Hand Techniques for Jazz Piano
You'll also get my weekly jazz newsletter with practice tips and inspiration