I did a similar project not too long a go. E.g. built RetroPie into Atari 2600 case. Anyways - yes, key presses that ControlBlock sends when using MAME layout are hardcoded into it's driver:
To change e.g. switch 'z' to send something else than z, say a, you would modify lines below and replace KEY_Z with KEY_A. And recompile and re-install the driver (instructions here https://github.com/petrockblog/ControlBlockService2).
Available KEY_* events (that you could replace KEY_Z above) are found from here: https://github.com/petrockblog/ControlBlockService2/blob/master/src/controlblock/uinput/UInputEventCodes.h
I hope this helps you forward. I did a slight re-write for the driver myself as I wanted all the Atari 2600 switches to provide their original functionality. Which isn't straightforward since official ControlBlock driver doesn't support switch where both on and off indicate certain state (e.g. on -> colorTV, off B&W). I suppose I could clean up my code a bit and put it up to github sometime.