Skip to content
LinMBC
Language:English

Alpha

Your mouse buttons, a different layout for every game.

LinMBC remaps mouse buttons to keys and combos on Linux, and switches profiles by itself when you alt-tab into a game. Inspired by X-Mouse Button Control for Windows.

Free and open source · MIT · Wayland first

LinMBC main window: the Game A profile, with the rear side button sending Q and the front side button looping Ctrl+2.
Button settings: keys Ctrl+2, loop until clicked again, random delay between 80 and 140 ms.
Each button: keys, how a click sends them, and the delay.

What it does

How it works

Two small programs: a background service that does the remapping, and the window where you set it up.

  1. 01

    Reads the mouse

    The service takes the mouse events before the desktop sees them. It only ever opens mice, never keyboards.

  2. 02

    Knows the game

    On KDE Plasma, a tiny KWin script reports the focused window, and the matching profile becomes active.

  3. 03

    Sends the keys

    Remapped buttons come out of a virtual keyboard and mouse, so games see ordinary input.

  4. 04

    Fails safe

    If anything goes wrong, every mouse is released and works normally again.

Install

1Arch Linux and CachyOS

Builds a package that installs the app, the permission rule for mice, the background service and the menu entry.

$ git clone https://github.com/JohnsonMauro/linmbc.git$ cd linmbc/packaging/arch$ makepkg -si

2Start it now and at every login

Then open LinMBC from the application menu and switch it on.

$ systemctl --user enable --now linmbc.service

Other distributions

Not packaged or tested yet. The README lists what a package needs; reports from other systems are welcome. README

Where it runs

Tested
Arch Linux / CachyOS with KDE Plasma 6 on Wayland.
Works, with a limit
Other desktops: buttons are remapped, but only with the Default profile.
Not tested yet
Debian, Ubuntu, Fedora, openSUSE and others; Plasma on X11.
Not supported
Systems without systemd-logind.

Good to know

  • Mice only

    The permission rule gives your user access to mouse devices and nothing else, so LinMBC cannot read what you type.

  • Online games and macros

    A 1:1 remap is an ordinary input change. Loops and repeats send several inputs per click, which some online games forbid in their terms of service. Check the rules first.

  • Alpha

    Tested on one machine so far. Expect rough edges, and please report what breaks.