Mouse and keyboard for RPG / Strategy and FPS (online). It’s a bit faster to aim than controller, in my opinion, and sets your right hand exclusively to aim and pull the trigger.

For FPS on story/single mode, controller does fine.

For racing / simulating games controller is way better than keyboard. The progressive controls (thumbsticks and triggers) are great for accelerating / brake / clutch / steering.