Separate multiple keyboards or mice in MAME on Android
MAME combines multiple keyboards and multiple mice by default. Enable `multikeyboard` or `multimouse` only when the Android port and its input provider expose the physical devices independently; otherwise the option cannot manufacture separate identities. Inspect MAME's Input Devices menu first, change one class, then bind and cold-retest each player without mixing mouse and lightgun paths.
Do this in order
- 01
Record the Android port and upstream revision, connected devices, hubs or adapters, provider names if visible, and the player conflict with default settings.
- 02
Open MAME's Input Devices menu and note whether each physical keyboard or mouse appears as an independent MAME device or as one aggregated device.
- 03
If independent devices exist, enable only `multikeyboard` or `multimouse`, restart the emulation session, and reopen Input Devices before remapping anything.
- 04
Bind one unique control from device 1 to player 1 and one from device 2 to player 2; clear accidental combined assignments rather than stacking new ones.
- 05
For pointer hardware, enable mouse or lightgun according to the machine and provider; avoid enabling both merely because one gun also reports mouse events.
- 06
Cold-reconnect in the same order, retest menus and gameplay, and save the configuration at the narrowest scope supported by the port.
Decision and diagnostic table
| Observation | Likely boundary | Next check |
|---|---|---|
| Both keyboards trigger one input | Provider or Android aggregated them | Input Devices menu before multikeyboard |
| Option exists, second device absent | Host or wrapper exposure | USB, permission, provider, and port log |
| Two mice move both players | Combined assignments or multimouse off | Device-specific bindings after restart |
| Lightgun aim behaves strangely | Mouse and lightgun paths both active | Select one documented provider path |
The provider owns host-device identity
MAME can distinguish devices only after the operating-system-dependent provider presents them. Some providers aggregate physical keyboards into one logical keyboard; Android or a wrapper can also combine events before they reach MAME.
The multi options reveal identities; they do not create them
`multikeyboard` and `multimouse` tell MAME to keep provider-reported devices separate. If Input Devices still shows one source, remapping cannot infer which physical unit produced the event.
Player assignment must survive reconnection
A setup that works once may depend on connection order or transient numbering. Preserve device identifiers when the port exposes them, reconnect cold, and keep a recovery path for the UI before handing the controls to another player.
Controller settings do not change game rights. Test only with lawful content, and do not distribute ROMs, BIOS files, CHDs, artwork, or copied controller profiles whose license is unknown.