NFMC-PAD(1) NeoFlux NFMC-PAD(1)

nfmc-pad - game pad to keyboard bridge for NeoFlux Media Center

nfmc-pad [--config PATH] [--verbose]
nfmc-pad --list
nfmc-pad --test COMBO
nfmc-pad --write-config [PATH]

nfmc-pad reads Linux game pads (evdev devices under /dev/input/event*) and turns their buttons, d-pad and sticks into X key presses, so a pad drives NeoFlux Media Center's menus, the slit dock apps and ordinary applications exactly as a keyboard would. One stick (the right one by default) moves the mouse pointer instead, and a button bound to a mouse button clicks, so a browser's video thumbnails are reachable from the sofa. It is a separate small process so the window manager itself never opens an input device. Pads plugged in later are picked up within a few seconds; unplugging one is harmless.

Directions (d-pad, hat, or a stick set to arrows) auto-repeat while held, so a menu scrolls; other buttons press once. Key presses, clicks and pointer motion are injected with the XTEST extension, which any X client may use.

Read bindings from PATH instead of ${XDG_CONFIG_HOME:-~/.config}/nfmc-pad/config.toml.
Log every button press and each binding as it is resolved.
List the game pads found (and whether each is readable), then exit.
Inject one key combo (for example Super+r) or mouse button (for example Mouse1) and exit — to check the X side without a pad.
Write the default bindings as a commented config file and exit.

A TOML file. Each button maps to a key combo spelled like a neoflux(1) keys.toml binding: a key name (Return, Escape, Up, F1, XF86AudioRaiseVolume) with optional modifiers (Super+r, Super+Shift+f), or to a mouse button: Mouse1 (left), Mouse2 (middle), Mouse3 (right), WheelUp, WheelDown. A mouse button stays pressed while the pad button is held, so it can drag a seek bar; wheel bindings auto-repeat like directions. Button names follow the Linux evdev game-pad layout:

The face buttons (A, B, Y, X on an Xbox-style pad).
Shoulders and triggers.
The small centre buttons; mode is the Guide / Home button.
Pressing the sticks in.
The d-pad, and any stick set to arrows.

Older pads in "DirectInput" mode (a Logitech F310/F710 with its switch on D, a Rumblepad) report classic joystick buttons; these are mapped by the Logitech numbering (1=west, 2=south, 3=east, 4=north, 5/6 shoulders, 7/8 triggers, 9 select, 10 start, 11/12 stick clicks). --verbose prints any button or axis code it does not know.

Defaults, chosen for someone watching television in a web browser: d-pad and left stick are the arrow keys (menus; page scrolling in a browser); the right stick moves the pointer; A is Return, B is Escape, X is a left click (Mouse1), Y is Super+Shift+f (movie); Start and Guide open the root menu (Super+r); Select is Super+Tab (next window — Firefox to Chrome and back); the shoulders are the volume keys; the triggers are Control+Shift+Tab and Control+Tab (previous / next browser tab); pressing the left stick in is mute, the right stick in is a right click (Mouse3). Other keys:

Fraction of full travel at which a stick counts as pressed (0.1-0.9), with hysteresis so a stick resting near the edge does not chatter. Each axis's range is inferred from what it sends: hats, signed 16-bit sticks (most pads) and 0-255 sticks centred at 128 (older DirectInput pads) all work. Analogue triggers count as tl2 / tr2 past half travel.
Auto-repeat timing for held directions.
What each stick does: the four directions, the mouse pointer, or nothing. Defaults: left arrows, right pointer. On a DirectInput pad the right stick reports on the Z/RZ axes; those are recognised as a stick (rather than analogue triggers) by their first, near-centre value.
Pointer speed in pixels per second at full deflection. The curve is quadratic, so a small push moves the pointer slowly for fine aiming and the rim crosses a 1080p screen in under two seconds.
Deflection (fraction of full travel) below which a pointer stick is at rest. Raise it if the pointer drifts with the stick released.

On a system with logind or elogind, udev tags joystick devices uaccess so the user at the seat may read them with no further setup. Otherwise add the user to the input group. nfmc-pad --list says whether each pad is readable.

nfmc(1), neoflux(1)

October 2026 nfmc-pad 0.5.3