What you need for this is dual analog controls, something every playstation since the 90s has included. [Marcel] created a replacement electronics board for the Sony DualShock 3 controller for ...
Most of the inputs on a PS5 controller are clearly labeled, but that isn't the case with the L3 and R3 buttons.