The USB Overdrive is a device driver for macOS that handles any USB or Bluetooth mouse, keyboard, trackball, joystick, gamepad or gaming device from any manufacturer and lets you configure it either globally or on a per-application, per-device basis. Note that the Apple Magic Mouse and Magic Trackpad are not handled by the USB Overdrive to let macOS implement its full multitouch support.
The USB Overdrive reads all kinds of wheels, buttons, keys, switches and controls and assigns them to useful actions like clicking, typing, scrolling, launching, opening documents and so forth. It can easily handle several devices at once and can assign different settings to each one.
A preliminary beta version of the USB Overdrive is available for macOS 11.1 Big Sur. The previous release works in macOS 10.15 (Catalina), macOS 10.14 (Mojave), 10.13 (High Sierra), 10.12 (Sierra) and 10.11 (El Capitan). Older releases are available for ancient macOS versions.