With libevdev, mouse and keyboard are bound to devices in /dev/input with names like "event0" and "event1". Different keyboard/mouse hw binds to different numbers, so it is important to allow overrides via shell variables. E.g. SQUEAK_MSDEV=/dev/input/event1 SQUEAK_KBDEV=/dev/input/event0 vs SQUEAK_MSDEV=/dev/input/event0 SQUEAK_KBDEV=/dev/input/event1
Mouse rebinding works, but not keyboard rebinding.