Usually people don’t that.
The preferred solution for those mice in linux for as long as I can remember is modifier left clicking where you hold down ctrl or alt or whatever when you left click to get right or middle.
The reason people don’t do long click and instead do modifiers is because it allows you to use three button inout which is what x and whatever came before it were designed for and secretly everything in a linux gui expects.
If you absolutely have to have long press and cannot use modifiers because your other hand is occupied when clicking the mouse button due to chronic masturbation, evdev or the other x11 input emulation configurations are the way to go.

