I must admit I found that ui_active setting difficult to find. I might have even hacked the mess source code originally, forcing mess to always exit on the ESC key press when I stumbled across the ui_active thing
Stick with it though, the mame/mess speccy emulation once you get your head around it, is the way forward I think. Once your head is around it, you'll find it quite straight forward getting other computers emulated using it (I also use it for Speccy, Amstrad CPC, BBCB Micro and Atari 400/800 emulation). I particularly like the way how easy it is to remap keys, and to adjust screen/zoom settings (For instance, most speccy games only use a small/middle part of the screen, mame/mess allows you to zoom into that part, making full use of your screen).
Some other things that might help you out:
From the command line, if you run:
mame.exe -showusage > usage.txt
This will create a usage.txt file for you that describes (briefly) the various command line options supported by your version of mame. "ui_active" is described (briefly!) in there.
Another command line option which might help you out, if you are going to emulate more than one speccy game, is the "cfg_directory" option. I found I needed to have a different config directory per game. Say, if you run a game like this:
mess spectrum -dump c:\mess\games\spec\atic_atac.z80 -cfg_directory c:\mess\cfg\atic_atac
or
mess spectrum -dump c:\mess\games\spec\alien8.z80 -cfg_directory c:\mess\cfg\alien8
A default config file will be created in the cfg_directory specified. Whilst running the game, you can then go into the TAB menu, remap the keys/control, change zoom/display settings, and once you press ESC these settings will be updated automatically in the cfg_directory specified.
I probably waffling on now and doing a very poor job explaining this, but I figured its worth mentioning
Good luck and hope this helps!