space handlers and undo...

I’m trying to write a space handler to make blender a bit more tablet friendly… It’s pretty much done, but there are a few things I can’t quite get working:

As Jesterking has pointed out to me, Space handlers are a bit hacky and not all button events work…

I’m having particular problems with trying to send ctrl z and ctrl shift z… the ctrl portion gets ignored…

(I’m using Window.Qual.CTRL and Draw.ZKEY to no avail…

same thing for sending Draw.TABKEY and Draw.SPACEKEY

Now for Tab key, i just simulated its function by using Window.editmode()

Is there a way to get undo and redo functionality directly in a script?

whilst I’m here, any way to get the “spacebar menu”?
what about maximise/minimising the window?