Good info so far, just wanted to add a couple of things:
Shazaaam! (typically) requires a dedicated button on the KeyWiz, but does not rob an input - you still have 32 total inputs, but you would have 33 buttons if they were all used (counting joysticks as buttons).
The KeyWiz default codeset is very well designed for MAME. You can probably use it and just adjust your frontend to use the remaining unused default inputs.
If you don't want the default codeset, the KeyWiz will reset to it on re-boot, but you can then load a custom codeset by placing a shortcut to the KeyWiz software in the startup folder.
You can actually have
more than 15 codesets. Been a while since I've done it, but it involves something like the following (unfortunately, I don't have the software on this machine, so can't verify): Program the desired codeset and save it as (for example) Codeset M. Locate and copy the Codeset M (M.kwz

) file and rename it something like daphne.kwz (extension

). Call daphne.kwz instead of M.kwz from your command-line shortcut (batch-file, for all you DOS-literate types).
You can add a virtually unlimited number of codesets this way.
My opinions on buttons (
Red - Not recommended, Yellow - Marginal, Green - Required
0-service coin - Don't think I've ever used this, even on the keyboardF1-raster special effects - Same as above.F2-Test service which I may not include - Used once or twice on the Williams games, only on initial setup. Would at most assign this to a Shazaaam function, if that.6 buttons on each joystick for street fighter bringing the total so far to 12 - Agreed, in fact, consider 8 buttons per joystick if you plan on using console (Nintendo, etc.) emulators, although I prefer gamepads for these.Tilde - Very rarely used, could be on a Shazaaam! function, IMHOtab, enter - Kinda mixed feelings on these. I didn't plan to include them, but my pinball flippers mapped to them since I use the default codeset, and I ended up using them quite often. Recommend putting them somewhere that they won't get accidentally activated.pause - DefinitelyF3 reset - Pretty dangerous to have on a cab. Make sure it can't be pressed accidentallybackspace & Home used for Gameex to get back to main screen and backspace to previous screens - I don't use GameEx, but if you do and feel you will need them, I would include them.1P, 2P - DefinitelyCoin 1 & coin 2 ( i think only one of these is necessary please correct me) - As Fozzy said, most games can get by with only one, but I would include both, just to not eliminate games from the cab for lack of one inputI am also wiring a 4 way joystick but I assume I can wire that with the same connections as the 1player 8way- As Fozzy said, yep.Not mentioned - Esc or some way to end the emulator. Recommend setting this as a combination of two other buttons or Shazaaam'd off the Pause key.HTH!