A mini USB keyboard for the default MAME cabinet keys
This mini keyboard/HID controller provides the standard (non-player control) MAME keys for a cabinet and utilises NicoHood's excellent HID-Project library.
It also includes keys for controlling the system (master) volume - Volume up, down and mute (tested on Win 10 and 11)
Ideal for cabinets with Zero Delay Joystick Controllers, providing the critical remaining keys needed for a cabinet whilst maintaining the default key mappings within MAME.
I built this on an Arduino Leonardo clone (DFRobot Dreamer Nano). Other boards are compatible with the HID-Project library- see "Supported Arduinos" at https://github.com/NicoHood/HID. Pins/pin availability may vary between boards, so if you choose a different board you may need to edit the code.
The keyboard provides the following MAME Key assignments :
- Coin 1 - 5 key
- Coin 2 - 6 key
- Player 1 Start - 1 key
- Player 2 Start - 2 key
- Exit - Esc key
- Pause - P key
- Select - Enter key
- Menu - Tab key
- Mame Volume - Tilde "~" key (press then use joystick left/right to control MAME volume)
- Service - F2 key
- Service Coin - 9 key
HID Media keys
- Volume Up - System Volume Up
- Volume Down - System Volume Down
- Mute - System Volume Mute (Toggle)
Wiring is simple - wire the buttons you need directly to pins D2 to D12 and to A0 to A2 as follows, with the button switching to GND
- Coin1 to D2
- Coin2 to D3
- Player1 to D4
- Player2 to D5
- Exit to D6
- Pause to D7
- Select to D8
- Menu to D9
- Mame Volume to D10
- Service to D11
- Service Coin to D12
Media control
- System Volume Up to A0
- System Volume Down to A1
- System Volum Mute to A2
Example wiring on the DFRobot Leonardo (Dreamer Nano)