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 USB devices at once and can assign different settings to each one.
A command-line installer for Windows
SharpKeys is a utility that manages a Registry key that allows Windows to remap one key to any other key. Included in the application is a list of common keyboard keys and a Type Key feature to automatically recognize most keyboard keys. It was originally developed in C# using .NET v2 but has been updated to support .NET 4.0 Client Profile