I'll tell you how I've managed to change the ~ key (of the button you have configured) from the master volume (useless function that I never use) to the overclock slider. After some days trying without success, I've just found a very simple solution.
In ui.c change, under the section called
/*-------------------------------------------------
slider_init - initialize the list of slider
controls
-------------------------------------------------*/
move this
/* add CPU overclocking (cheat only) */
if (options_get_bool(mame_options(), OPTION_CHEAT))
{
for (device = machine->firstcpu; device != NULL; device = cpu_next(device))
{
void *param = (void *)device;
astring_printf(string, "Overclock CPU %s", device->tag);
*tailptr = slider_alloc(machine, astring_c(string), 1, 1000, 2000, 50, slider_overclock, param);
tailptr = &(*tailptr)->next;
}
}
before
/* add overall volume */
*tailptr = slider_alloc(machine, "Master Volume", -32, 0, 0, 1, slider_volume, NULL);
tailptr = &(*tailptr)->next;
So, moving the overclock slider to the first position in ui.c means that it appears in the first position of the slider controls, and the ~ key simply calls the first slider.