thank you for asking this question ! This is my fifth year playing mania. At the start I used to play with a keyboard like everybody else. But after a while I startet playing with the guitar hero drums (you can use JoyToKey to convert controller inputs to keyboard inputs). You just have way more control over the buttons and hitting fast notes becomes way easier when you can use 2 sticks on one note than just one finger on a single key(this is a big plus point for 4 key mode). You can play up to 7 keys if you own 2 pedals for the drums. I think this is the best way to play mania.
I mean it could depend on one's comfort level, and what kind of maps you play. for example, universally the most recommended choice is what NightNarumi said, since mech's keyboard tend to react way better with mania patterns (most of the time at least) but sometimes, a good choice could be ranging for a special controller (like the pop'n mania for 9k), or using another type of keyboard like membrane, etc for example i just use this laptop keyboard, and other than the fact that i end up jumping everywhere with the keys, its pretty good or me
IDK but yeah, whatever that suits you should be the best